Builder

Struct Builder 

Source
pub struct Builder { /* private fields */ }
Expand description

The builder for the logger. You can use builder() to get an instance of this.

Implementations§

Source§

impl Builder

Source

pub fn build(self) -> EguiLogger

Returns the Logger. Useful if you want to add it to a multi-logger. See here for an example.

Source

pub fn max_level(self, max_level: LevelFilter) -> Self

Sets the max level for the logger. this only has an effect when calling init.

Defaults to Debug.

Source

pub fn show_all_categories(self, show_all_categories: bool) -> Self

Whether to show all categories by default (versus only those that are explicitly enabled).

Defaults to true.

Source

pub fn init(self) -> Result<(), SetLoggerError>

Initializes the global logger. This should be called very early in the program.

The max level is the max_level field.

Trait Implementations§

Source§

impl Default for Builder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.