Struct Stdin
struct Stdin { ... }
A handle to the standard input stream of a process.
The handle implements the AsyncRead trait, but beware that concurrent
reads of Stdin must be executed with care.
This handle is best used for non-interactive uses, such as when a file
is piped into the application. For technical reasons, stdin is
implemented by using an ordinary blocking read on a separate thread, and
it is impossible to cancel that read. This can make shutdown of the
runtime hang until the user presses enter.
For interactive uses, it is recommended to spawn a thread dedicated to user input and use blocking IO directly in that thread.
Created by the stdin function.
Implementations
impl AsFd for Stdin
fn as_fd(self: &Self) -> BorrowedFd<'_>
impl AsRawFd for Stdin
fn as_raw_fd(self: &Self) -> RawFd
impl AsyncRead for Stdin
fn poll_read(self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut ReadBuf<'_>) -> Poll<Result<()>>
impl Debug for Stdin
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Freeze for Stdin
impl RefUnwindSafe for Stdin
impl Send for Stdin
impl Sync for Stdin
impl Unpin for Stdin
impl UnsafeUnpin for Stdin
impl UnwindSafe for Stdin
impl<R> AsyncReadExt for Stdin
impl<T> Any for Stdin
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Stdin
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Stdin
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for Stdin
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into for Stdin
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Stdin
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Stdin
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>