[−][src]Struct arf_strings::PosixString
A utility for converting from inside-world path-oriented strings, such as file and directory names, into NUL-terminated byte strings that can be passed to POSIX-like APIs. Input strings containing NUL bytes are interpreted as ARF strings.
Methods
impl PosixString
[src]
pub fn from_path_bytes(bytes: &[u8]) -> Result<Self, ()>
[src]
Construct a PosixString
with data copied from the given byte slice.
If the data is not valid UTF-8, or if it contains NUL bytes and is not
valid ARF, return an error.
pub fn from_path_str(s: &str) -> Result<Self, ()>
[src]
Construct a PosixString
with data copied from the given &str
.
If the data contains NUL bytes and is not valid ARF, return an error.
pub fn as_cstr(&self) -> &CStr
[src]
Auto Trait Implementations
impl RefUnwindSafe for PosixString
impl Send for PosixString
impl Sync for PosixString
impl Unpin for PosixString
impl UnwindSafe for PosixString
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,