pub struct AnsiEscapes<W> { /* private fields */ }
Implementations§
Source§impl<W> AnsiEscapes<W>
impl<W> AnsiEscapes<W>
Trait Implementations§
Source§impl<W: Clone> Clone for AnsiEscapes<W>
impl<W: Clone> Clone for AnsiEscapes<W>
Source§fn clone(&self) -> AnsiEscapes<W>
fn clone(&self) -> AnsiEscapes<W>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<W: Debug> Debug for AnsiEscapes<W>
impl<W: Debug> Debug for AnsiEscapes<W>
Source§impl<'mk, W> MakeWriter<'mk> for AnsiEscapes<W>where
W: MakeWriter<'mk>,
impl<'mk, W> MakeWriter<'mk> for AnsiEscapes<W>where
W: MakeWriter<'mk>,
Source§fn make_writer_for(&'mk self, meta: &Metadata<'_>) -> Option<Self::Writer>
fn make_writer_for(&'mk self, meta: &Metadata<'_>) -> Option<Self::Writer>
Returns a Writer
for writing data from the span or event described
by the provided Metadata
.
By default, this calls self.make_writer()
, ignoring
the provided metadata, but implementations can override this to provide
metadata-specific behaviors.
This method allows MakeWriter
implementations to implement different
behaviors based on the span or event being written. The MakeWriter
type might return different writers based on the provided metadata, or
might write some values to the writer before or after providing it to
the caller.
Source§type Writer = AnsiEscapes<<W as MakeWriter<'mk>>::Writer>
type Writer = AnsiEscapes<<W as MakeWriter<'mk>>::Writer>
The concrete
fmt::Write
implementation returned by make_writer
.fn enabled(&self, meta: &Metadata<'_>) -> bool
fn line_len(&self) -> usize
Source§impl<W: PartialEq> PartialEq for AnsiEscapes<W>
impl<W: PartialEq> PartialEq for AnsiEscapes<W>
Source§impl<W: Write> SetColor for AnsiEscapes<W>
impl<W: Write> SetColor for AnsiEscapes<W>
Source§impl<W> Write for AnsiEscapes<W>where
W: Write,
impl<W> Write for AnsiEscapes<W>where
W: Write,
impl<W: Copy> Copy for AnsiEscapes<W>
impl<W: Eq> Eq for AnsiEscapes<W>
impl<W> StructuralPartialEq for AnsiEscapes<W>
Auto Trait Implementations§
impl<W> Freeze for AnsiEscapes<W>where
W: Freeze,
impl<W> RefUnwindSafe for AnsiEscapes<W>where
W: RefUnwindSafe,
impl<W> Send for AnsiEscapes<W>where
W: Send,
impl<W> Sync for AnsiEscapes<W>where
W: Sync,
impl<W> Unpin for AnsiEscapes<W>where
W: Unpin,
impl<W> UnwindSafe for AnsiEscapes<W>where
W: UnwindSafe,
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> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<'a, M> MakeWriterExt<'a> for Mwhere
M: MakeWriter<'a>,
impl<'a, M> MakeWriterExt<'a> for Mwhere
M: MakeWriter<'a>,
Source§fn with_max_level(self, level: Level) -> WithMaxLevel<Self>where
Self: Sized,
fn with_max_level(self, level: Level) -> WithMaxLevel<Self>where
Self: Sized,
Wraps
self
and returns a MakeWriter
that will only write output
for events at or below the provided verbosity Level
. For instance,
Level::TRACE
is considered to be _more verbosethan
Level::INFO`. Read moreSource§fn with_min_level(self, level: Level) -> WithMinLevel<Self>where
Self: Sized,
fn with_min_level(self, level: Level) -> WithMinLevel<Self>where
Self: Sized,
Wraps
self
and returns a MakeWriter
that will only write output
for events at or above the provided verbosity Level
. Read moreSource§fn with_filter<F>(self, filter: F) -> WithFilter<Self, F>
fn with_filter<F>(self, filter: F) -> WithFilter<Self, F>
Wraps
self
with a predicate that takes a span or event’s Metadata
and returns a bool
. The returned MakeWriter
’s
MakeWriter::make_writer_for
method will check the predicate to
determine if a writer should be produced for a given span or event. Read moreSource§fn and<B>(self, other: B) -> Tee<Self, B>
fn and<B>(self, other: B) -> Tee<Self, B>
Combines
self
with another type implementing MakeWriter
, returning
a new MakeWriter
that produces writers that write to both
outputs. Read moreSource§fn or_else<B>(self, other: B) -> OrElse<Self, B>
fn or_else<B>(self, other: B) -> OrElse<Self, B>
Combines
self
with another type implementing MakeWriter
, returning
a new MakeWriter
that calls other
’s make_writer
if self
’s
make_writer
returns None
.fn with_line_len(self, len: usize) -> WithLineLen<Self>where
Self: MakeWriter<'a> + Sized,
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<W> WriteExt for Wwhere
W: Write,
impl<W> WriteExt for Wwhere
W: Write,
Source§fn with_indent(&mut self, indent: usize) -> WithIndent<'_, Self>where
Self: Sized,
fn with_indent(&mut self, indent: usize) -> WithIndent<'_, Self>where
Self: Sized,
Wraps
self
in a WithIndent
writer that indents every new line
that’s written to it by indent
spaces.