pub struct Output {
pub mode: OutputMode,
pub channel: Channel,
}
Expand description
An output destination for a program.
Fields§
§mode: OutputMode
The mode of the output.
channel: Channel
The channel to use for the output.
Implementations§
Source§impl Output
impl Output
Sourcepub const fn new(mode: OutputMode, channel: usize) -> Self
pub const fn new(mode: OutputMode, channel: usize) -> Self
Create a new output destination.
Sourcepub const fn stdout_char() -> Self
pub const fn stdout_char() -> Self
Output to STDOUT (ASCII character)
Sourcepub const fn stdout_int() -> Self
pub const fn stdout_int() -> Self
Output to STDOUT (integer)
Sourcepub const fn stdout_float() -> Self
pub const fn stdout_float() -> Self
Output to STDOUT (float)
Sourcepub const fn stderr_char() -> Self
pub const fn stderr_char() -> Self
Output to STDERR (ASCII character)
Sourcepub const fn stderr_int() -> Self
pub const fn stderr_int() -> Self
Output to STDERR (integer)
Sourcepub const fn stderr_float() -> Self
pub const fn stderr_float() -> Self
Output to STDERR (float)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Output
impl<'de> Deserialize<'de> for Output
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Output
impl Ord for Output
Source§impl PartialOrd for Output
impl PartialOrd for Output
impl Eq for Output
impl StructuralPartialEq for Output
Auto Trait Implementations§
impl Freeze for Output
impl RefUnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnwindSafe for Output
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more