pub struct PatternFormatter<P> { /* private fields */ }
Expand description
Formats logs according to a specified pattern.
Implementations§
Source§impl<P> PatternFormatter<P>where
P: Pattern,
impl<P> PatternFormatter<P>where
P: Pattern,
Sourcepub fn new(pattern: P) -> Self
pub fn new(pattern: P) -> Self
Creates a new PatternFormatter
object with the given pattern.
Currently users can only create a pattern
object by using:
- Macro
pattern!
to build a pattern with a literal template string at compile-time. - Macro
runtime_pattern!
to build a pattern at runtime.
Trait Implementations§
Source§impl<P: Clone> Clone for PatternFormatter<P>
impl<P: Clone> Clone for PatternFormatter<P>
Source§fn clone(&self) -> PatternFormatter<P>
fn clone(&self) -> PatternFormatter<P>
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 moreAuto Trait Implementations§
impl<P> Freeze for PatternFormatter<P>where
P: Freeze,
impl<P> RefUnwindSafe for PatternFormatter<P>where
P: RefUnwindSafe,
impl<P> Send for PatternFormatter<P>where
P: Send,
impl<P> Sync for PatternFormatter<P>where
P: Sync,
impl<P> Unpin for PatternFormatter<P>where
P: Unpin,
impl<P> UnwindSafe for PatternFormatter<P>where
P: 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