[][src]Struct witchcraft_log::RecordBuilder

pub struct RecordBuilder<'a>(_);

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]

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]

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]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,