Struct Cursor
pub struct Cursor<T> { /* private fields */ }
Expand description
Wraps an in memory reader providing the position
function.
Implementations§
§impl<T> Cursor<T>
impl<T> Cursor<T>
pub fn set_position(&mut self, position: u64)
pub fn set_position(&mut self, position: u64)
Sets the internal position.
This method allows seeking within the wrapped memory by setting the position.
Note that setting a position that is larger than the buffer length will cause reads to return no bytes (EOF).
pub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Returns the inner buffer.
This is the whole wrapped buffer, including the bytes already read.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Cursor<T>where
T: Freeze,
impl<T> RefUnwindSafe for Cursor<T>where
T: RefUnwindSafe,
impl<T> Send for Cursor<T>where
T: Send,
impl<T> Sync for Cursor<T>where
T: Sync,
impl<T> Unpin for Cursor<T>where
T: Unpin,
impl<T> UnwindSafe for Cursor<T>where
T: UnwindSafe,
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