Struct terminal_io::NeverTerminalReader
source · [−]pub struct NeverTerminalReader<Inner: Read> { /* private fields */ }
Expand description
A wrapper around a Read
which implements ReadTerminal
but isn’t ever
a terminal.
Implementations
sourceimpl<Inner: Read> NeverTerminalReader<Inner>
impl<Inner: Read> NeverTerminalReader<Inner>
sourcepub fn into_inner(self) -> Inner
pub fn into_inner(self) -> Inner
Consume self
and return the inner stream.
Trait Implementations
sourceimpl<Inner: Read + AsFd> AsFd for NeverTerminalReader<Inner>
impl<Inner: Read + AsFd> AsFd for NeverTerminalReader<Inner>
sourcefn as_fd(&self) -> BorrowedFd<'_>
fn as_fd(&self) -> BorrowedFd<'_>
Borrows the file descriptor. Read more
sourceimpl<Inner: Read + AsRawFd> AsRawFd for NeverTerminalReader<Inner>
impl<Inner: Read + AsRawFd> AsRawFd for NeverTerminalReader<Inner>
sourceimpl<Inner: Debug + Read> Debug for NeverTerminalReader<Inner>
impl<Inner: Debug + Read> Debug for NeverTerminalReader<Inner>
sourceimpl<Inner: Read> Read for NeverTerminalReader<Inner>
impl<Inner: Read> Read for NeverTerminalReader<Inner>
sourcefn read(&mut self, buf: &mut [u8]) -> Result<usize>
fn read(&mut self, buf: &mut [u8]) -> Result<usize>
Pull some bytes from this source into the specified buffer, returning how many bytes were read. Read more
sourcefn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize>
fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize>
Like read
, except that it reads into a slice of buffers. Read more
sourcefn is_read_vectored(&self) -> bool
fn is_read_vectored(&self) -> bool
can_vector
)Determines if this Read
er has an efficient read_vectored
implementation. Read more
sourcefn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize>
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize>
Read all bytes until EOF in this source, placing them into buf
. Read more
sourcefn read_to_string(&mut self, buf: &mut String) -> Result<usize>
fn read_to_string(&mut self, buf: &mut String) -> Result<usize>
Read all bytes until EOF in this source, appending them to buf
. Read more
sourcefn read_exact(&mut self, buf: &mut [u8]) -> Result<()>
fn read_exact(&mut self, buf: &mut [u8]) -> Result<()>
Read the exact number of bytes required to fill buf
. Read more
sourcefn read_buf(&mut self, buf: &mut ReadBuf<'_>) -> Result<(), Error>
fn read_buf(&mut self, buf: &mut ReadBuf<'_>) -> Result<(), Error>
read_buf
)Pull some bytes from this source into the specified buffer. Read more
sourcefn read_buf_exact(&mut self, buf: &mut ReadBuf<'_>) -> Result<(), Error>
fn read_buf_exact(&mut self, buf: &mut ReadBuf<'_>) -> Result<(), Error>
read_buf
)Read the exact number of bytes required to fill buf
. Read more
1.0.0 · sourcefn by_ref(&mut self) -> &mut Self
fn by_ref(&mut self) -> &mut Self
Creates a “by reference” adaptor for this instance of Read
. Read more
sourceimpl<Inner: Read> ReadTerminal for NeverTerminalReader<Inner>
impl<Inner: Read> ReadTerminal for NeverTerminalReader<Inner>
sourcefn is_line_by_line(&self) -> bool
fn is_line_by_line(&self) -> bool
Test whether the input is being sent a line at a time.
sourcefn is_input_terminal(&self) -> bool
fn is_input_terminal(&self) -> bool
Test whether the input is connected to a terminal. Read more
impl<Inner: Read> Terminal for NeverTerminalReader<Inner>
Auto Trait Implementations
impl<Inner> RefUnwindSafe for NeverTerminalReader<Inner> where
Inner: RefUnwindSafe,
impl<Inner> Send for NeverTerminalReader<Inner> where
Inner: Send,
impl<Inner> Sync for NeverTerminalReader<Inner> where
Inner: Sync,
impl<Inner> Unpin for NeverTerminalReader<Inner> where
Inner: Unpin,
impl<Inner> UnwindSafe for NeverTerminalReader<Inner> where
Inner: UnwindSafe,
Blanket Implementations
sourceimpl<T> AsFilelike for T where
T: AsFd,
impl<T> AsFilelike for T where
T: AsFd,
sourcefn as_filelike(&self) -> BorrowedFd<'_>
fn as_filelike(&self) -> BorrowedFd<'_>
Borrows the reference. Read more
sourcefn as_filelike_view<Target>(&self) -> FilelikeView<'_, Target> where
Target: FromFilelike + IntoFilelike,
fn as_filelike_view<Target>(&self) -> FilelikeView<'_, Target> where
Target: FromFilelike + IntoFilelike,
Return a borrowing view of a resource which dereferences to a &Target
or &mut Target
. Read more
sourceimpl<T> AsGrip for T where
T: AsFd,
impl<T> AsGrip for T where
T: AsFd,
sourcefn as_grip(&self) -> BorrowedFd<'_>
fn as_grip(&self) -> BorrowedFd<'_>
Extracts the grip.
sourceimpl<T> AsRawFilelike for T where
T: AsRawFd,
impl<T> AsRawFilelike for T where
T: AsRawFd,
sourcefn as_raw_filelike(&self) -> i32
fn as_raw_filelike(&self) -> i32
Returns the raw value.
sourceimpl<T> AsRawGrip for T where
T: AsRawFd,
impl<T> AsRawGrip for T where
T: AsRawFd,
sourcefn as_raw_grip(&self) -> i32
fn as_raw_grip(&self) -> i32
Extracts the raw grip.
sourceimpl<T> AsRawSocketlike for T where
T: AsRawFd,
impl<T> AsRawSocketlike for T where
T: AsRawFd,
sourcefn as_raw_socketlike(&self) -> i32
fn as_raw_socketlike(&self) -> i32
Returns the raw value.
sourceimpl<T> AsSocketlike for T where
T: AsFd,
impl<T> AsSocketlike for T where
T: AsFd,
sourcefn as_socketlike(&self) -> BorrowedFd<'_>
fn as_socketlike(&self) -> BorrowedFd<'_>
Borrows the reference.
sourcefn as_socketlike_view<Target>(&self) -> FilelikeView<'_, Target> where
Target: FromSocketlike + IntoSocketlike,
fn as_socketlike_view<Target>(&self) -> FilelikeView<'_, Target> where
Target: FromSocketlike + IntoSocketlike,
Return a borrowing view of a resource which dereferences to a &Target
or &mut Target
. Read more
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more