Trait bdrck::cli::AbstractStream [−][src]
This trait describes an abstract input or output stream.
This trait primarily exists for testing purposes. In almost all cases, users
will instead just use the concrete type Stream
defined below.
Associated Types
type Attributes: AbstractTerminalAttributes + Debug
[src]
A type which describes the attributes of this stream / terminal.
Required methods
fn isatty(&self) -> bool
[src]
Returns whether or not this stream refers to an interactive terminal (a TTY), as opposed to, for example, a pipe.
fn get_attributes(&self) -> IoResult<Self::Attributes>
[src]
Retrieve the current attributes of this stream / terminal.
fn set_attributes(&mut self, attributes: &Self::Attributes) -> IoResult<()>
[src]
Modify this stream's / terminal's attributes to match the given state.
fn as_reader(&self) -> Option<Box<dyn Read>>
[src]
Return a Read
for this stream, if reading is supported.
fn as_writer(&self) -> Option<Box<dyn Write>>
[src]
Return a Write
for this stream, if writing is supported.