pub struct OsUnit(/* private fields */);Available on crate feature
raw_os_str only.Expand description
The smallest unit of an unspecified platform-specific encoding permissible for interchange.
Unlike the results of OsStr::as_encoded_bytes and similar methods, this
unit may be stored and displayed to users in errors.
Instances are usually constructed using OsUnits.
Implementations§
Source§impl OsUnit
impl OsUnit
Sourcepub fn to_u64(&self) -> u64
pub fn to_u64(&self) -> u64
Returns a unique integer unambiguously representing the unit.
The returned value can be useful for display to users in escaped form but should otherwise be treated as meaningless.
§Implementation
Currently, this method can return:
- bytes (0x00 - 0xFF) – typically represented as
\xFF. - multi-byte units (0x100 - 0x10F_FFF) – typically represented as
\u10FFFF.
Future updates may return greater values, so callers are expected to handle them as well.
However, the implementation is subject to change. This section is only informative.
Trait Implementations§
impl Copy for OsUnit
Source§impl PartialOrd for OsUnit
impl PartialOrd for OsUnit
impl StructuralPartialEq for OsUnit
Auto Trait Implementations§
impl Freeze for OsUnit
impl RefUnwindSafe for OsUnit
impl Send for OsUnit
impl Sync for OsUnit
impl Unpin for OsUnit
impl UnsafeUnpin for OsUnit
impl UnwindSafe for OsUnit
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