[−][src]Struct witchcraft_log::RecordBuilder
A builder for Record
values.
Methods
impl<'a> RecordBuilder<'a>
[src]
pub fn new() -> RecordBuilder<'a>
[src]
Creates a RecordBuilder
initialized to default values.
pub fn level(&mut self, level: Level) -> &mut RecordBuilder<'a>
[src]
Sets the record's verbosity level.
Defaults to Info
.
pub fn target(&mut self, target: &'a str) -> &mut RecordBuilder<'a>
[src]
Sets the record's target.
Defaults to ""
.
pub fn file(&mut self, file: Option<&'a str>) -> &mut RecordBuilder<'a>
[src]
Sets the record's source file.
Defaults to None
.
pub fn line(&mut self, line: Option<u32>) -> &mut RecordBuilder<'a>
[src]
Sets the record's line.
Defaults to None
.
pub fn message(&mut self, message: &'static str) -> &mut RecordBuilder<'a>
[src]
Sets the record's message.
Defaults to ""
.
pub fn safe_params(
&mut self,
safe_params: &'a [(&'static str, &dyn Serialize)]
) -> &mut RecordBuilder<'a>
[src]
&mut self,
safe_params: &'a [(&'static str, &dyn Serialize)]
) -> &mut RecordBuilder<'a>
Sets the record's safe parameters.
Defaults to []
.
pub fn unsafe_params(
&mut self,
unsafe_params: &'a [(&'static str, &dyn Serialize)]
) -> &mut RecordBuilder<'a>
[src]
&mut self,
unsafe_params: &'a [(&'static str, &dyn Serialize)]
) -> &mut RecordBuilder<'a>
Sets the record's unsafe parameters.
pub fn error(&mut self, error: Option<&'a Error>) -> &mut RecordBuilder<'a>
[src]
Sets the record's error.
Defaults to None
.
pub fn build(&self) -> Record<'a>
[src]
Creates a Record
.
Trait Implementations
impl<'a> Default for RecordBuilder<'a>
[src]
fn default() -> RecordBuilder<'a>
[src]
Auto Trait Implementations
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,