pub struct Reader<'a> {
buf: &'a [u8],
offs: usize,
}
Expand description
Read from a byte slice.
Fields§
§buf: &'a [u8]
§offs: usize
Implementations§
source§impl<'a> Reader<'a>
impl<'a> Reader<'a>
pub fn init(bytes: &[u8]) -> Reader<'_>
pub fn rest(&mut self) -> &[u8] ⓘ
pub fn take(&mut self, len: usize) -> Option<&[u8]>
pub fn peek(&self, len: usize) -> Option<&[u8]>
pub fn any_left(&self) -> bool
pub fn left(&self) -> usize
pub fn used(&self) -> usize
pub fn sub(&mut self, len: usize) -> Option<Reader<'_>>
Auto Trait Implementations§
impl<'a> Freeze for Reader<'a>
impl<'a> RefUnwindSafe for Reader<'a>
impl<'a> Send for Reader<'a>
impl<'a> Sync for Reader<'a>
impl<'a> Unpin for Reader<'a>
impl<'a> UnwindSafe for Reader<'a>
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
§impl<Tail, T> Prepend<T> for Tail
impl<Tail, T> Prepend<T> for Tail
§type PreprendResult = Tail
type PreprendResult = Tail
The Resulting [
TupleList
], of an [Prepend::prepend()
] call,
including the prepended entry.