pub trait Peek {
// Required method
fn peek(&mut self, buf: &mut [u8]) -> Result<usize>;
}Expand description
A trait providing the peek function for reading without consuming.
Many common Read implementations have Peek implementations, however
Stdin, ChildStderr, ChildStdout, PipeReader, and
CharDevice do not, since they are unbuffered and pipes and character
devices don’t support any form of peeking.
Required Methods§
Implementations on Foreign Types§
Source§impl Peek for UnixStream
Available on Unix only.
impl Peek for UnixStream
Available on Unix only.