pub struct OsString { /* private fields */ }
Expand description
OsString
This is not guaranteed to have the same binary representation as Rust’s standard library even on Windows.
Implementations§
Source§impl OsString
impl OsString
pub fn new() -> Self
pub unsafe fn from_encoded_bytes_unchecked(bytes: &[u8]) -> Self
pub fn as_os_str(&self) -> &OsStr
pub fn into_encoded_bytes(self) -> Vec<u8>
pub fn into_string(self) -> Result<String, OsString>
pub fn push<S: AsRef<OsStr>>(&mut self, what: S)
pub fn with_capacity(capacity: usize) -> Self
pub fn clear(&mut self)
pub fn capacity(&self) -> usize
pub fn reserve(&mut self, additional: usize)
pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>
pub fn reserve_exact(&mut self, additional: usize)
pub fn try_reserve_exact( &mut self, additional: usize, ) -> Result<(), TryReserveError>
pub fn shrink_to_fit(&mut self)
pub fn shrink_to(&mut self, min_capacity: usize)
pub fn into_boxed_os_str(self) -> Box<OsStr>
pub fn to_str(&self) -> Option<&str>
Methods from Deref<Target = OsStr>§
pub fn to_str(&self) -> Option<&str>
pub fn to_string_lossy(&self) -> Cow<'_, str>
pub fn to_os_string(&self) -> OsString
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn as_encoded_bytes(&self) -> &[u8]
pub fn to_ascii_lowercase(&self) -> OsString
pub fn to_ascii_uppercase(&self) -> OsString
pub fn is_ascii(&self) -> bool
pub fn display(&self) -> impl Display
pub fn eq_ignore_ascii_case<S: AsRef<OsStr>>(&self, other: S) -> bool
Trait Implementations§
Source§impl Ord for OsString
impl Ord for OsString
Source§impl PartialOrd for OsString
impl PartialOrd for OsString
impl Eq for OsString
impl StructuralPartialEq for OsString
Auto Trait Implementations§
impl Freeze for OsString
impl RefUnwindSafe for OsString
impl Send for OsString
impl Sync for OsString
impl Unpin for OsString
impl UnwindSafe for OsString
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