Trait zmtp::Peek [] [src]

pub trait Peek: Read + Debug {
    fn peek(&mut self, buf: &mut [u8]) -> Result<usize>;
}

This trait allows peeking (i.e. non-destructive reading) in Readers. Non-destructive here refers to the fact that when calling peek(slice) on the same slice multiple times in a row, every call should return the same data.

Required Methods

Peek buf.len() bytes and write them to buf.

Implementors