pub trait ToLogParams<'a>: Sized {
// Required method
fn to_log_params(self) -> LogParams<'a>;
// Provided methods
fn once(self) -> LogParams<'a> { ... }
fn skip_first(self) -> LogParams<'a> { ... }
fn occurs(self, occurs: LogOccurrence) -> LogParams<'a> { ... }
fn only_if(self, only_if: bool) -> LogParams<'a> { ... }
fn debug(self) -> LogParams<'a> { ... }
fn info(self) -> LogParams<'a> { ... }
fn warn(self) -> LogParams<'a> { ... }
fn error(self) -> LogParams<'a> { ... }
fn fatal(self) -> LogParams<'a> { ... }
fn severity(self, severity: Severity) -> LogParams<'a> { ... }
}Expand description
rclrs’s ToLogParams: anything a level macro takes as its first argument,
and the modifiers that chain off it.
Implemented for &Logger and LogParams; see the module note.
Required Methods§
Sourcefn to_log_params(self) -> LogParams<'a>
fn to_log_params(self) -> LogParams<'a>
Convert to params with this value’s settings.
Provided Methods§
Sourcefn skip_first(self) -> LogParams<'a>
fn skip_first(self) -> LogParams<'a>
Emit every record of this call site except the first.
Sourcefn occurs(self, occurs: LogOccurrence) -> LogParams<'a>
fn occurs(self, occurs: LogOccurrence) -> LogParams<'a>
Set the occurrence rule.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<'a, 'b: 'a> ToLogParams<'a> for &'a &'b Logger
log_info!(&logger, …) where logger is already a &Logger — the
spelling the level macros accepted by deref coercion before they took
ToLogParams.