[−][src]Trait ordcode::buf::TailReadBytes
Trait for reading from the tail of byte buffer
Required methods
pub fn peek_tail<F, R>(&mut self, n: usize, f: F) -> Result<R> where
F: FnOnce(&[u8]) -> Result<R>,
[src]
F: FnOnce(&[u8]) -> Result<R>,
pub fn advance_tail(&mut self, n: usize)
[src]
Advance buffer head by n
bytes. n
should be smaller than remaining buffer size.
Provided methods
pub fn read_tail<F, R>(&mut self, n: usize, f: F) -> Result<R> where
F: FnOnce(&[u8]) -> Result<R>,
[src]
F: FnOnce(&[u8]) -> Result<R>,
Get n
bytes from the beginning of buffer, advance by n
bytes
Implementations on Foreign Types
impl<'a, T> TailReadBytes for &'a mut T where
T: TailReadBytes,
[src]
T: TailReadBytes,
pub fn peek_tail<F, R>(&mut self, n: usize, f: F) -> Result<R> where
F: FnOnce(&[u8]) -> Result<R>,
[src]
F: FnOnce(&[u8]) -> Result<R>,