Struct posish::path::DecInt[][src]

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.

Example

use posish::path::DecInt;

assert_eq!(
    format!("hello {}", DecInt::new(9876).display()),
    "hello 9876"
);

Implementations

Construct a new path component from an integer.

Construct a new path component from a file descriptor.

Return the raw byte buffer.

Trait Implementations

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 the conversion.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

The resulting type after dereferencing.

Dereferences the value.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

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.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.