pub struct Altin(/* private fields */);Expand description
Corresponding to std::io::Stdin
Implementations§
Source§impl Altin
impl Altin
Sourcepub fn lock(&self) -> AltinLock<'_>
pub fn lock(&self) -> AltinLock<'_>
Locks this handle to the altio input stream, returning a readable guard.
The lock is released when the returned lock goes out of scope. The returned guard also provides read_line(), read_to_string(), is_terminal() for accessing the underlying data.
Sourcepub fn lines(&self) -> Lines<'_> ⓘ
pub fn lines(&self) -> Lines<'_> ⓘ
Consumes this handle and returns an iterator over input lines.
Sourcepub fn read_line(&self, buf: &mut String) -> Result<usize>
pub fn read_line(&self, buf: &mut String) -> Result<usize>
Locks this handle and reads a line of input, appending it to the specified buffer.
Sourcepub fn read_to_string(&self, buf: &mut String) -> Result<usize>
pub fn read_to_string(&self, buf: &mut String) -> Result<usize>
Read all contents in this source, appending them to buf.
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
Returns false to indicate it isn’t a terminal/tty.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Altin
impl RefUnwindSafe for Altin
impl Send for Altin
impl Sync for Altin
impl Unpin for Altin
impl UnwindSafe for Altin
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more