pub struct Cursor<'a>(/* private fields */);Expand description
Cursor of a string slice.
Implementations§
Source§impl<'a> Cursor<'a>
impl<'a> Cursor<'a>
Sourcepub fn try_advance<F, U, Err>(&mut self, f: F) -> Result<U, Err>
pub fn try_advance<F, U, Err>(&mut self, f: F) -> Result<U, Err>
Sourcepub fn advance_by(&mut self, n: usize)
pub fn advance_by(&mut self, n: usize)
Advances the inner cursor by n bytes.
§Panics
Panics if the inner slice doesn’t has n remaining bytes.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Cursor<'a>
impl<'a> RefUnwindSafe for Cursor<'a>
impl<'a> Send for Cursor<'a>
impl<'a> Sync for Cursor<'a>
impl<'a> Unpin for Cursor<'a>
impl<'a> UnsafeUnpin for Cursor<'a>
impl<'a> UnwindSafe for Cursor<'a>
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