Enum tracing_subscriber::fmt::writer::EitherWriter [−][src]
pub enum EitherWriter<A, B> {
A(A),
B(B),
}
Expand description
A writer that is one of two types implementing io::Write
.
This may be used by MakeWriter
implementations that may conditionally
return one of two writers.
Variants
A(A)
A writer of type A
.
B(B)
A writer of type B
.
Implementations
Returns a disabled writer.
Any bytes written to the returned writer are discarded.
This is equivalent to returning Option::None
.
Returns an enabled writer of type T
.
This is equivalent to returning Option::Some
.
Trait Implementations
fn clone(&self) -> EitherWriter<A, B>ⓘNotable traits for EitherWriter<A, B>impl<A, B> Write for EitherWriter<A, B> where
A: Write,
B: Write,
fn clone(&self) -> EitherWriter<A, B>ⓘNotable traits for EitherWriter<A, B>impl<A, B> Write for EitherWriter<A, B> where
A: Write,
B: Write,
impl<A, B> Write for EitherWriter<A, B> where
A: Write,
B: Write,
Returns a copy of the value. Read more
Performs copy-assignment from source
. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Write a buffer into this writer, returning how many bytes were written. Read more
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
Attempts to write an entire buffer into this writer. Read more
Writes a formatted string into this writer, returning any error encountered. Read more