pub struct Cursor<T> {
inner: T,
pos: u64,
}Fields§
§inner: T§pos: u64Implementations§
Trait Implementations§
Source§impl<T: AsRef<[u8]>> Read for Cursor<T>
impl<T: AsRef<[u8]>> Read for Cursor<T>
fn read(&mut self, buf: &mut [u8]) -> Result<usize>
fn read_exact(&mut self, buf: &mut [u8]) -> Result<()>
fn read_to_end(&mut self, out: &mut Vec<u8>) -> Result<usize>
fn take(self, limit: u64) -> Take<Self>where
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn bytes(self) -> Bytes<Self> ⓘwhere
Self: Sized,
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> UnsafeUnpin for Cursor<T>where
T: UnsafeUnpin,
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