Skip to main content

LogParams

Struct LogParams 

Source
pub struct LogParams<'a> { /* private fields */ }
Expand description

rclrs’s LogParams: the logger plus the modifiers one record carries.

ADOPT-BOUNDED: it borrows the Logger (LogParams<'a>) where rclrs’s owns a logger name. Build one through ToLogParams.

Implementations§

Source§

impl<'a> LogParams<'a>

Source

pub const fn new(logger: &'a Logger) -> Self

rclrs’s LogParams::new: logger, at Info, every record, no throttle, no filter.

Source

pub const fn logger(&self) -> &'a Logger

The logger the record goes to.

Source

pub const fn get_logger_name(&self) -> &'static str

rclrs’s get_logger_name: the logger’s name.

Source

pub const fn get_severity(&self) -> Severity

rclrs’s get_severity.

Source

pub const fn get_occurence(&self) -> LogOccurrence

rclrs’s get_occurence (rclrs’s spelling, kept).

Source

pub const fn get_throttle(&self) -> Duration

rclrs’s get_throttle: Duration::ZERO for no throttle.

Source

pub const fn get_throttle_clock(&self) -> ThrottleClock

rclrs’s get_throttle_clock.

Source

pub const fn get_user_filter(&self) -> bool

rclrs’s get_user_filter: the only_if condition.

Trait Implementations§

Source§

impl<'a> Clone for LogParams<'a>

Source§

fn clone(&self) -> LogParams<'a>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for LogParams<'a>

Source§

impl<'a> ToLogParams<'a> for LogParams<'a>

Source§

fn to_log_params(self) -> LogParams<'a>

Convert to params with this value’s settings.
Source§

fn once(self) -> LogParams<'a>

Emit only the first record of this call site.
Source§

fn skip_first(self) -> LogParams<'a>

Emit every record of this call site except the first.
Source§

fn occurs(self, occurs: LogOccurrence) -> LogParams<'a>

Set the occurrence rule.
Source§

fn only_if(self, only_if: bool) -> LogParams<'a>

Emit only while only_if is true. Combines with an earlier filter by AND, so a chain of conditions all have to hold.
Source§

fn debug(self) -> LogParams<'a>

At Debug.
Source§

fn info(self) -> LogParams<'a>

At Info.
Source§

fn warn(self) -> LogParams<'a>

At Warn.
Source§

fn error(self) -> LogParams<'a>

At Error.
Source§

fn fatal(self) -> LogParams<'a>

At Fatal.
Source§

fn severity(self, severity: Severity) -> LogParams<'a>

At severity.

Auto Trait Implementations§

§

impl<'a> Freeze for LogParams<'a>

§

impl<'a> RefUnwindSafe for LogParams<'a>

§

impl<'a> Send for LogParams<'a>

§

impl<'a> Sync for LogParams<'a>

§

impl<'a> Unpin for LogParams<'a>

§

impl<'a> UnsafeUnpin for LogParams<'a>

§

impl<'a> UnwindSafe for LogParams<'a>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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.