pub(crate) struct Builder {
pub format_timestamp: Option<TimestampPrecision>,
pub format_module_path: bool,
pub format_target: bool,
pub format_level: bool,
pub format_indent: Option<usize>,
pub custom_format: Option<Box<dyn Fn(&mut Formatter, &Record<'_>) -> Result<()> + Sync + Send>>,
pub format_suffix: &'static str,
built: bool,
}
Fields§
§format_timestamp: Option<TimestampPrecision>
§format_module_path: bool
§format_target: bool
§format_level: bool
§format_indent: Option<usize>
§custom_format: Option<Box<dyn Fn(&mut Formatter, &Record<'_>) -> Result<()> + Sync + Send>>
§format_suffix: &'static str
§built: bool
Implementations§
source§impl Builder
impl Builder
sourcepub fn build(
&mut self,
) -> Box<dyn Fn(&mut Formatter, &Record<'_>) -> Result<()> + Sync + Send>
pub fn build( &mut self, ) -> Box<dyn Fn(&mut Formatter, &Record<'_>) -> Result<()> + Sync + Send>
Convert the format into a callable function.
If the custom_format
is Some
, then any default_format
switches are ignored.
If the custom_format
is None
, then a default format is returned.
Any default_format
switches set to false
won’t be written by the format.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl !RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl !UnwindSafe for Builder
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