pub struct Altout(/* private fields */);Expand description
Corresponding to std::io::Stdout
Implementations§
Source§impl Altout
impl Altout
Sourcepub fn lock(&self) -> AltoutLock<'_>
pub fn lock(&self) -> AltoutLock<'_>
Locks this handle to the altio output stream, returning a writable guard.
The lock is released when the returned lock goes out of scope. The returned guard also provide write_fmt() for writing data.
Sourcepub fn write_fmt(&mut self, args: Arguments<'_>) -> Result<()>
pub fn write_fmt(&mut self, args: Arguments<'_>) -> Result<()>
Writes a formatted string into Altout, won’t returning any error.
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
Returns false to indicate it isn’t a terminal/tty.
Source§impl Altout
impl Altout
Sourcepub fn recv(&self) -> String
pub fn recv(&self) -> String
Receives text from altio output stream.
This function will always block the current thread if there is no data available.
Sourcepub fn try_recv(&self) -> Option<String>
pub fn try_recv(&self) -> Option<String>
Tries to receive text from altio output stream, without blocking.
Sourcepub fn recv_line(&self) -> String
pub fn recv_line(&self) -> String
Receives one line of text from altio output stream.
This function will always block the current thread if there is no data available.
Sourcepub fn try_recv_line(&self) -> Option<String>
pub fn try_recv_line(&self) -> Option<String>
Tries to receive one line of text from altio output stream, without blocking.
Sourcepub fn recv_lines(&self, cnt: usize) -> String
pub fn recv_lines(&self, cnt: usize) -> String
Receives certain amount lines of text from altio output stream.
This function will always block the current thread if there is no data available.
Sourcepub fn try_recv_lines(&self, cnt: usize) -> Option<String>
pub fn try_recv_lines(&self, cnt: usize) -> Option<String>
Tries to receive certain amount lines of text from altio output stream.
Sourcepub fn peek_line(&self) -> Option<String>
pub fn peek_line(&self) -> Option<String>
Read one line of text in altio output stream, leaving it in the stream.
This function will always block the current thread if there is no data available.
Sourcepub fn peek_lines(&self, cnt: usize) -> Option<String>
pub fn peek_lines(&self, cnt: usize) -> Option<String>
Tries to receive certain amount lines of text in altio output stream, leaving it in the stream.
This function will always block the current thread if there is no data available.