[−][src]Trait system_interface::io::Peek
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
fn peek(&mut self, buf: &mut [u8]) -> Result<usize>
[src]
Reads data from a stream without consuming it; subsequent reads will
re-read the data. May return fewer bytes than requested; Ok(0)
indicates that seeking is not possible (but reading may still be).
Implementations on Foreign Types
impl Peek for File
[src]
impl Peek for TcpStream
[src]
impl Peek for UnixStream
[src]
impl Peek for Repeat
[src]
impl<'a> Peek for Empty
[src]
impl<'a> Peek for &'a [u8]
[src]
impl<'a> Peek for StdinLock<'a>
[src]
impl<B: BufRead + ?Sized> Peek for Box<B>
[src]
impl<'a, B: BufRead + ?Sized> Peek for &'a mut B
[src]
impl<R: Read> Peek for BufReader<R>
[src]
impl<T> Peek for Cursor<T> where
T: AsRef<[u8]>,
[src]
T: AsRef<[u8]>,