pub struct Limit<T> { /* private fields */ }
Trait Implementations§
source§impl<T: MemoryRead> MemoryRead for Limit<T>
impl<T: MemoryRead> MemoryRead for Limit<T>
fn read(&mut self, data: &mut [u8]) -> Result<&mut Self, AccessError>
fn skip(&mut self, len: usize) -> Result<&mut Self, AccessError>
fn len(&self) -> usize
fn read_plain<T: AsBytes + FromBytes>(&mut self) -> Result<T, AccessError>
fn read_n<T: AsBytes + FromBytes + Copy>( &mut self, len: usize, ) -> Result<Vec<T>, AccessError>
fn read_all(&mut self) -> Result<Vec<u8>, AccessError>
fn limit(self, len: usize) -> Limit<Self>where
Self: Sized,
Auto Trait Implementations§
impl<T> Freeze for Limit<T>where
T: Freeze,
impl<T> RefUnwindSafe for Limit<T>where
T: RefUnwindSafe,
impl<T> Send for Limit<T>where
T: Send,
impl<T> Sync for Limit<T>where
T: Sync,
impl<T> Unpin for Limit<T>where
T: Unpin,
impl<T> UnwindSafe for Limit<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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)