Skip to main content

VLog

Trait VLog 

Source
pub trait VLog {
    // Required methods
    fn enabled(&self, metadata: &Metadata<'_>) -> bool;
    fn vlog(&self, record: &Record<'_>);
    fn clear(&self, surface: &str);
}
Expand description

A trait encapsulating the operations required of a vlogger.

Required Methods§

Source

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.

Source

fn vlog(&self, record: &Record<'_>)

Draw a point or line in 3D or 2D (ignoring z or using it as z-index).

This is only called if the vlogging of messages with the given metadata is enabled.

Source

fn clear(&self, surface: &str)

Clear a drawing surface e.g. to redraw its content.

Implementations on Foreign Types§

Source§

impl<T> VLog for &T
where T: ?Sized + VLog,

Source§

fn enabled(&self, metadata: &Metadata<'_>) -> bool

Source§

fn vlog(&self, record: &Record<'_>)

Source§

fn clear(&self, surface: &str)

Source§

impl<T> VLog for Box<T>
where T: ?Sized + VLog,

Available on crate feature std only.
Source§

fn enabled(&self, metadata: &Metadata<'_>) -> bool

Source§

fn vlog(&self, record: &Record<'_>)

Source§

fn clear(&self, surface: &str)

Source§

impl<T> VLog for Arc<T>
where T: ?Sized + VLog,

Available on crate feature std only.
Source§

fn enabled(&self, metadata: &Metadata<'_>) -> bool

Source§

fn vlog(&self, record: &Record<'_>)

Source§

fn clear(&self, surface: &str)

Implementors§