pub enum EitherOsStr<'str> {
Borrowed(&'str OsStr),
Owned(OsString),
}
Expand description
Either borrowed or owned allocation of an OS-native string.
Variants§
Trait Implementations§
Source§impl<'str> AsRef<OsStr> for EitherOsStr<'str>
impl<'str> AsRef<OsStr> for EitherOsStr<'str>
Source§impl<'str> Debug for EitherOsStr<'str>
impl<'str> Debug for EitherOsStr<'str>
Source§impl<'str> Deref for EitherOsStr<'str>
impl<'str> Deref for EitherOsStr<'str>
Source§impl<'str> IntoOsString for EitherOsStr<'str>
impl<'str> IntoOsString for EitherOsStr<'str>
Source§impl<'str> ToOsStr for EitherOsStr<'str>
impl<'str> ToOsStr for EitherOsStr<'str>
Auto Trait Implementations§
impl<'str> Freeze for EitherOsStr<'str>
impl<'str> RefUnwindSafe for EitherOsStr<'str>
impl<'str> !Send for EitherOsStr<'str>
impl<'str> !Sync for EitherOsStr<'str>
impl<'str> Unpin for EitherOsStr<'str>
impl<'str> UnwindSafe for EitherOsStr<'str>
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes
Size for each variant:
Borrowed
: 16 bytesOwned
: 16 bytes