pub struct RecordBuilder<'a>(/* private fields */);Expand description
A builder for Record values.
Implementations§
Source§impl<'a> RecordBuilder<'a>
impl<'a> RecordBuilder<'a>
Sourcepub fn new() -> RecordBuilder<'a>
pub fn new() -> RecordBuilder<'a>
Creates a RecordBuilder initialized to default values.
Sourcepub fn level(&mut self, level: Level) -> &mut RecordBuilder<'a>
pub fn level(&mut self, level: Level) -> &mut RecordBuilder<'a>
Sets the record’s verbosity level.
Defaults to Info.
Sourcepub fn target(&mut self, target: &'a str) -> &mut RecordBuilder<'a>
pub fn target(&mut self, target: &'a str) -> &mut RecordBuilder<'a>
Sets the record’s target.
Defaults to "".
Sourcepub fn file(&mut self, file: Option<&'a str>) -> &mut RecordBuilder<'a>
pub fn file(&mut self, file: Option<&'a str>) -> &mut RecordBuilder<'a>
Sets the record’s source file.
Defaults to None.
Sourcepub fn line(&mut self, line: Option<u32>) -> &mut RecordBuilder<'a>
pub fn line(&mut self, line: Option<u32>) -> &mut RecordBuilder<'a>
Sets the record’s line.
Defaults to None.
Sourcepub fn message(&mut self, message: &'static str) -> &mut RecordBuilder<'a>
pub fn message(&mut self, message: &'static str) -> &mut RecordBuilder<'a>
Sets the record’s message.
Defaults to "".
Sourcepub fn safe_params(
&mut self,
safe_params: &'a [(&'static str, &dyn Serialize)],
) -> &mut RecordBuilder<'a>
pub fn safe_params( &mut self, safe_params: &'a [(&'static str, &dyn Serialize)], ) -> &mut RecordBuilder<'a>
Sets the record’s safe parameters.
Defaults to [].
Sourcepub fn unsafe_params(
&mut self,
unsafe_params: &'a [(&'static str, &dyn Serialize)],
) -> &mut RecordBuilder<'a>
pub fn unsafe_params( &mut self, unsafe_params: &'a [(&'static str, &dyn Serialize)], ) -> &mut RecordBuilder<'a>
Sets the record’s unsafe parameters.
Sourcepub fn error(&mut self, error: Option<&'a Error>) -> &mut RecordBuilder<'a>
pub fn error(&mut self, error: Option<&'a Error>) -> &mut RecordBuilder<'a>
Sets the record’s error.
Defaults to None.
Trait Implementations§
Source§impl<'a> Default for RecordBuilder<'a>
impl<'a> Default for RecordBuilder<'a>
Source§fn default() -> RecordBuilder<'a>
fn default() -> RecordBuilder<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for RecordBuilder<'a>
impl<'a> !RefUnwindSafe for RecordBuilder<'a>
impl<'a> !Send for RecordBuilder<'a>
impl<'a> !Sync for RecordBuilder<'a>
impl<'a> Unpin for RecordBuilder<'a>
impl<'a> !UnwindSafe for RecordBuilder<'a>
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