Enum tracing_subscriber::fmt::writer::EitherWriter
source · [−]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
Auto Trait Implementations
impl<A, B> RefUnwindSafe for EitherWriter<A, B> where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for EitherWriter<A, B> where
A: Send,
B: Send,
impl<A, B> Sync for EitherWriter<A, B> where
A: Sync,
B: Sync,
impl<A, B> Unpin for EitherWriter<A, B> where
A: Unpin,
B: Unpin,
impl<A, B> UnwindSafe for EitherWriter<A, B> where
A: UnwindSafe,
B: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more