pub struct DecInt { /* fields omitted */ }
Expand description
Format an integer into a decimal Path
component, without constructing a
temporary PathBuf
or String
.
This is used for opening paths such as /proc/self/fd/<fd>
on Linux.
use posish::path::DecInt;
assert_eq!(
format!("hello {}", DecInt::new(9876).display()),
"hello 9876"
);
Construct a new path component from an integer.
Construct a new path component from a file descriptor.
Return the raw byte buffer.
Return a view of this string as a string slice.
Return a potentially-lossy rendering of this string as a Cow<str>
.
Return a view of this string as a maybe-owned CStr
.
Consume self
and return a view of this string as a maybe-owned
CStr
. Read more
Return a view of this string as a byte slice.
Run a closure with self
passed in as a &CStr
.
Performs copy-assignment from source
. Read more
The resulting type after dereferencing.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.