Skip to main content

AuditExt

Trait AuditExt 

Source
pub trait AuditExt {
    // Required methods
    fn trail(&self) -> Option<&Trail>;
    fn audit(&self, event: &str) -> Option<Builder>;
}
Expand description

req.audit(...) — an entry with the request’s context already on it.

Required Methods§

Source

fn trail(&self) -> Option<&Trail>

The trail, or None when the plugin is not registered.

Source

fn audit(&self, event: &str) -> Option<Builder>

Begin an entry, with the actor’s id, the address and the user agent filled in from this request.

The actor’s name is not, and cannot be: the framework’s Identity holds an id and nothing else, on purpose. The caller adds it with Builder::by, from whatever it is already holding.

Returns None rather than a silent no-op builder when there is no trail: a caller that meant to record something should find out that it did not, and let Some(audit) = req.audit(..) is where they find out.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl AuditExt for Request

Source§

fn trail(&self) -> Option<&Trail>

Source§

fn audit(&self, event: &str) -> Option<Builder>

Implementors§