pub trait VLog {
// Required methods
fn enabled(&self, metadata: &Metadata<'_>) -> bool;
fn vlog(&self, record: &Record<'_>);
fn clear(&self, surface: &str);
fn flush(&self);
}Expand description
A trait encapsulating the operations required of a vlogger.
Required Methods§
Sourcefn enabled(&self, metadata: &Metadata<'_>) -> bool
fn enabled(&self, metadata: &Metadata<'_>) -> bool
Determines if a vlog command with the specified metadata would be vlogged.
This is used by the vlog_enabled! macro to allow callers to avoid
expensive computation of vlog message arguments if the message would be
discarded anyway.
§For implementors
This method isn’t called automatically by the vlogging macros.
It’s up to an implementation of the VLog trait to call enabled in its own
vlog method implementation to guarantee that filtering is applied.
Sourcefn vlog(&self, record: &Record<'_>)
fn vlog(&self, record: &Record<'_>)
Draw a point or line in 3D or 2D (ignoring z or using it as z-index).
§For implementors
Note that enabled is not necessarily called before this method.
Implementations of vlog should perform all necessary filtering
internally.