pub struct Cursor<T> { /* private fields */ }Expand description
Emulation of std::io::Cursor
This is not exported to bindings users as serialization is done via a bindings-specific pipeline.
Implementations§
Source§impl<T> Cursor<T>
impl<T> Cursor<T>
Sourcepub 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.
Sourcepub fn get_mut(&mut self) -> &mut T
pub fn get_mut(&mut self) -> &mut T
Gets a mutable reference to the underlying value in this cursor.
Care should be taken to avoid modifying the internal I/O state of the underlying value as it may corrupt this cursor’s position.
Sourcepub fn set_position(&mut self, pos: u64)
pub fn set_position(&mut self, pos: u64)
Sets the position of this cursor.
Trait Implementations§
Source§impl<T: AsRef<[u8]>> Read for Cursor<T>
impl<T: AsRef<[u8]>> Read for Cursor<T>
impl<T: Eq> Eq for Cursor<T>
impl<T> StructuralPartialEq for Cursor<T>
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