[−][src]Struct async_std::io::Stdin
A handle to the standard input of the current process.
Created by the stdin
function.
This type is an async version of std::io::Stdin
.
Methods
impl Stdin
[src]
pub async fn read_line<'_, '_>(&'_ self, buf: &'_ mut String) -> Result<usize>
[src]
Reads a line of input into the specified buffer.
Examples
use async_std::io; let stdin = io::stdin(); let mut line = String::new(); stdin.read_line(&mut line).await?;
Trait Implementations
impl Read for Stdin
[src]
fn poll_read(
self: Pin<&mut Self>,
cx: &mut Context,
buf: &mut [u8]
) -> Poll<Result<usize>>
[src]
self: Pin<&mut Self>,
cx: &mut Context,
buf: &mut [u8]
) -> Poll<Result<usize>>
fn poll_read_vectored(
self: Pin<&mut Self>,
cx: &mut Context,
bufs: &mut [IoSliceMut]
) -> Poll<Result<usize>>
[src]
self: Pin<&mut Self>,
cx: &mut Context,
bufs: &mut [IoSliceMut]
) -> Poll<Result<usize>>
fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> ImplFuture<'a, Result<usize>> where
Self: Unpin,
[src]
Self: Unpin,
fn read_vectored<'a>(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ImplFuture<'a, Result<usize>> where
Self: Unpin,
[src]
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ImplFuture<'a, Result<usize>> where
Self: Unpin,
fn read_to_end<'a>(
&'a mut self,
buf: &'a mut Vec<u8>
) -> ImplFuture<'a, Result<usize>> where
Self: Unpin,
[src]
&'a mut self,
buf: &'a mut Vec<u8>
) -> ImplFuture<'a, Result<usize>> where
Self: Unpin,
fn read_to_string<'a>(
&'a mut self,
buf: &'a mut String
) -> ImplFuture<'a, Result<usize>> where
Self: Unpin,
[src]
&'a mut self,
buf: &'a mut String
) -> ImplFuture<'a, Result<usize>> where
Self: Unpin,
fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ImplFuture<'a, Result<()>> where
Self: Unpin,
[src]
Self: Unpin,
impl AsRawFd for Stdin
[src]
impl AsRawHandle for Stdin
[src]
fn as_raw_handle(&self) -> RawHandle
[src]
impl Debug for Stdin
[src]
Auto Trait Implementations
impl Send for Stdin
impl Unpin for Stdin
impl Sync for Stdin
impl RefUnwindSafe for Stdin
impl UnwindSafe for Stdin
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
ⓘImportant traits for &'_ mut Ffn borrow_mut(&mut self) -> &mut T
[src]
ⓘImportant traits for &'_ mut F
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,