Struct class_file::MString
source · 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 StructuralEq for MString
impl StructuralPartialEq for MString
Auto Trait Implementations
impl RefUnwindSafe for MString
impl Send for MString
impl Sync for MString
impl Unpin for MString
impl UnwindSafe for MString
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more