pub struct MString { /* private fields */ }
Implementations§
Methods from Deref<Target = mstr>§
pub fn to_utf8(&self) -> Cow<'_, str>
Sourcepub fn get(&self, idx: usize) -> Option<&u8>
pub fn get(&self, idx: usize) -> Option<&u8>
Returns the byte at the given index.
Returns None
if idx
is greater than or equal to the string length.
Sourcepub unsafe fn get_unchecked(&self, idx: usize) -> &u8
pub unsafe fn get_unchecked(&self, idx: usize) -> &u8
Returns the byte at the given index, bypassing bounds-checking.
§Safety
The caller of this function must guarantee that idx
is less than
the string length.
Trait Implementations§
impl Eq for MString
impl StructuralPartialEq for MString
Auto Trait Implementations§
impl Freeze for MString
impl RefUnwindSafe for MString
impl Send for MString
impl Sync for MString
impl Unpin for MString
impl UnwindSafe for MString
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