doc.rust-lang.org
pub mod rust_2024
The 2024 version of the prelude of The Rust Standard Library.
module
std
Stable since 1.85.0
Version 1.100.0-nightly
doc.rust-lang.org
pub mod rust_2021
The 2021 version of the prelude of The Rust Standard Library.
module
std
Stable since 1.55.0
Version 1.100.0-nightly
doc.rust-lang.org
pub mod rust_2018
The 2018 version of the prelude of The Rust Standard Library.
module
std
Stable since 1.55.0
Version 1.100.0-nightly
doc.rust-lang.org
pub mod rust_2015
The 2015 version of the prelude of The Rust Standard Library.
module
std
Stable since 1.55.0
Version 1.100.0-nightly
doc.rust-lang.org
pub mod prelude
The Rust Prelude
module
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
primitive pointer
Raw, unsafe pointers, *const T, and *mut T.
primitive
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_separator(c: char) -> bool
Determines whether the character is one of the permitted path separators for the current platform.
function
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn absolute<P>(path: P) -> io::Result<PathBuf>
Makes the path absolute without accessing the filesystem.
function
std
Stable since 1.79.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct StripPrefixError
An error returned from Path::strip_prefix if the prefix was not found.
struct
std
Stable since 1.7.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn kind(&self) -> Prefix<'a>
Returns the parsed prefix data.
method
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn as_os_str(&self) -> &'a OsStr
Returns the raw OsStr slice for this prefix.
method
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct PrefixComponent<'a>
A structure wrapping a Windows path prefix as well as its unparsed string representation.
struct
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn is_verbatim(&self) -> bool
Determines if the prefix is verbatim, i.e., begins with \\?\.
method
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub enum Prefix<'a>
Windows path prefixes, e.g., C: or \\server\share.
enum
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn with_capacity(capacity: usize) -> PathBuf
Creates a new PathBuf with a given capacity used to create the internal OsString. See with_capacity defined on OsString.
associated_function
std
Stable since 1.44.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn try_reserve_exact(&mut self, additional: usize) -> Result<(), TryReserveError>
Invokes try_reserve_exact on the underlying instance of OsString.
method
std
Stable since 1.63.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>
Invokes try_reserve on the underlying instance of OsString.
method
std
Stable since 1.63.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn shrink_to_fit(&mut self)
Invokes shrink_to_fit on the underlying instance of OsString.
method
std
Stable since 1.44.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn shrink_to(&mut self, min_capacity: usize)
Invokes shrink_to on the underlying instance of OsString.
method
std
Stable since 1.56.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn set_file_name<S>(&mut self, file_name: S)
Updates self.file_name to file_name.
method
std
Stable since 1.0.0
Version 1.100.0-nightly