[][src]Trait ordcode::buf::TailReadBytes

pub trait TailReadBytes: ReadBytes {
    pub fn peek_tail<F, R>(&mut self, n: usize, f: F) -> Result<R>
    where
        F: FnOnce(&[u8]) -> Result<R>
;
pub fn advance_tail(&mut self, n: usize); pub fn read_tail<F, R>(&mut self, n: usize, f: F) -> Result<R>
    where
        F: FnOnce(&[u8]) -> Result<R>
, { ... } }

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]

pub fn advance_tail(&mut self, n: usize)[src]

Advance buffer head by n bytes. n should be smaller than remaining buffer size.

Loading content...

Provided methods

pub fn read_tail<F, R>(&mut self, n: usize, f: F) -> Result<R> where
    F: FnOnce(&[u8]) -> Result<R>, 
[src]

Get n bytes from the beginning of buffer, advance by n bytes

Loading content...

Implementations on Foreign Types

impl<'a, T> TailReadBytes for &'a mut T where
    T: TailReadBytes
[src]

Loading content...

Implementors

impl<'a> TailReadBytes for DeBytesReader<'a>[src]

Loading content...