Skip to main content

Module plugin

Module plugin 

Source
Expand description

Attaching the package to an application, and reaching it from a handler.

ⓘ
App::new().plugin(Audit::new(db.clone()))

The migrations are not registered from here: they belong in the registry the CLI generates, next to the application’s own. Add them with registry.extend(rustlavel_audit::migrations());

Structs§

Audit
Registers the Trail into application state.

Traits§

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