[][src]Trait delog::Delogger

pub unsafe trait Delogger: Log + TryLog {
    pub fn buffer(&self) -> &'static mut [u8];
pub fn log_attempt_count(&self) -> &'static AtomicUsize;
pub fn log_success_count(&self) -> &'static AtomicUsize;
pub fn log_flush_count(&self) -> &'static AtomicUsize;
pub fn read(&self) -> &'static AtomicUsize;
pub fn written(&self) -> &'static AtomicUsize;
pub fn claimed(&self) -> &'static AtomicUsize;
pub fn flush(&self, logs: &str);
pub fn render(&self, args: &Arguments<'_>) -> &'static [u8]; pub fn capacity(&self) -> usize { ... } }

Semi-abstract characterization of the deferred loggers that the delog! macro produces.

Safety

This trait is markes "unsafe" to signal that users should never (need to) "write their own", but always go through the delog! macro.

The user has access to the global logger via delog::trylogger(), but only as TryLog/Log implementation, not with this direct access to implementation details.

Required methods

pub fn buffer(&self) -> &'static mut [u8][src]

the underlying buffer

pub fn log_attempt_count(&self) -> &'static AtomicUsize[src]

How often was one of the logging macros called.

pub fn log_success_count(&self) -> &'static AtomicUsize[src]

How often was one of the logging macros called without early exit (e.g., buffer not full)

pub fn log_flush_count(&self) -> &'static AtomicUsize[src]

How often was the flusher called.

pub fn read(&self) -> &'static AtomicUsize[src]

How many bytes were flushed so far.

pub fn written(&self) -> &'static AtomicUsize[src]

How many bytes were logged so far.

pub fn claimed(&self) -> &'static AtomicUsize[src]

How many characters were claimed so far.

pub fn flush(&self, logs: &str)[src]

Call the flusher.

pub fn render(&self, args: &Arguments<'_>) -> &'static [u8][src]

Actually render the arguments (via internal static buffer).

Loading content...

Provided methods

pub fn capacity(&self) -> usize[src]

Capacity of circular buffer.

Loading content...

Implementors

impl Delogger for Delogger[src]

Loading content...