Struct simple_bytes::OffsetCursor [−][src]
pub struct OffsetCursor<T> { /* fields omitted */ }
Expand description
A Cursor which holds a specific offset.
Implementations
Creates a new Cursor.
May panic if the offset is bigger than the inner len. Depending on inner.
Updates the offset.
Maybe panic if there aren’t enough bytes left.
Returns the inner value as a mutable reference. Shrinking the inner len or updating the position may lead to panics when reading or writing.
Returns the inner value, discarding the offset.
Trait Implementations
Tries to read a given length without updating
the internal position. Returns None
if there are not enought
bytes remaining. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl<T> RefUnwindSafe for OffsetCursor<T> where
T: RefUnwindSafe,
impl<T> Send for OffsetCursor<T> where
T: Send,
impl<T> Sync for OffsetCursor<T> where
T: Sync,
impl<T> Unpin for OffsetCursor<T> where
T: Unpin,
impl<T> UnwindSafe for OffsetCursor<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more