what is string::from()
?
is it a function or a keyword ?
where is it defined ?
from which library ?
saying standard library
adds more complexity , which library the standard is vast
The one that's part of the language, literally called std
.
In case the term “standard library” isn’t clear, see the homepage of std docs:
The Rust Standard Library
The Rust Standard Library is the foundation of portable Rust software, a set of minimal and battle-tested shared abstractions for the broader Rust ecosystem. It offers core types, like
Vec<T>
andOption<T>
, library-defined operations on language primitives, standard macros, I/O and multithreading, among many other things.
std
is available to all Rust crates by default. Therefore, the standard library can be accessed inuse
statements through the pathstd
, as inuse std::env
.
1 Like