pub struct DecInt { /* private fields */ }Available on (crate features
fs or mount or net) and crate feature itoa only.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.
§Examples
use rustix::path::DecInt;
assert_eq!(
format!("hello {}", DecInt::new(9876).as_ref().display()),
"hello 9876"
);Implementations§
Trait Implementations§
Source§impl Arg for DecInt
impl Arg for DecInt
Source§fn to_string_lossy(&self) -> Cow<'_, str>
fn to_string_lossy(&self) -> Cow<'_, str>
Returns a potentially-lossy rendering of this string as a
Cow<'_, str>.Source§fn as_cow_c_str(&self) -> Result<Cow<'_, CStr>>
fn as_cow_c_str(&self) -> Result<Cow<'_, CStr>>
Returns a view of this string as a maybe-owned
CStr.Auto Trait Implementations§
impl Freeze for DecInt
impl RefUnwindSafe for DecInt
impl Send for DecInt
impl Sync for DecInt
impl Unpin for DecInt
impl UnwindSafe for DecInt
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)