Struct log::MetadataBuilder [−][src]
pub struct MetadataBuilder<'a> { /* fields omitted */ }
Builder for Metadata
.
Typically should only be used by log library creators or for testing and “shim loggers”.
The MetadataBuilder
can set the different parameters of a Metadata
object, and returns
the created object when build
is called.
Example
ⓘ
let target = "myApp"; use log::{Level, MetadataBuilder}; let metadata = MetadataBuilder::new() .level(Level::Debug) .target(target) .build();
Implementations
impl<'a> MetadataBuilder<'a>
[src]
impl<'a> MetadataBuilder<'a>
[src]pub fn new() -> MetadataBuilder<'a>
[src]
Construct a new MetadataBuilder
.
The default options are:
level
:Level::Info
target
:""
pub fn level(&mut self, arg: Level) -> &mut MetadataBuilder<'a>
[src]
Setter for level
.
pub fn target(&mut self, target: &'a str) -> &mut MetadataBuilder<'a>
[src]
Setter for target
.
pub fn build(&self) -> Metadata<'a>
[src]
Returns a Metadata
object.
Trait Implementations
impl<'a> Hash for MetadataBuilder<'a>
[src]
impl<'a> Hash for MetadataBuilder<'a>
[src]impl<'a> Ord for MetadataBuilder<'a>
[src]
impl<'a> Ord for MetadataBuilder<'a>
[src]impl<'a> PartialEq<MetadataBuilder<'a>> for MetadataBuilder<'a>
[src]
impl<'a> PartialEq<MetadataBuilder<'a>> for MetadataBuilder<'a>
[src]fn eq(&self, other: &MetadataBuilder<'a>) -> bool
[src]
fn ne(&self, other: &MetadataBuilder<'a>) -> bool
[src]
impl<'a> PartialOrd<MetadataBuilder<'a>> for MetadataBuilder<'a>
[src]
impl<'a> PartialOrd<MetadataBuilder<'a>> for MetadataBuilder<'a>
[src]fn partial_cmp(&self, other: &MetadataBuilder<'a>) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn lt(&self, other: &Rhs) -> bool#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn le(&self, other: &Rhs) -> bool#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn gt(&self, other: &Rhs) -> bool#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn ge(&self, other: &Rhs) -> bool