Skip to main content

OperatorTrail

Trait OperatorTrail 

Source
pub trait OperatorTrail: Sync {
    // Required methods
    fn record(
        &self,
        build: impl FnOnce(Actor, ClientContext) -> AuditRecord + Send,
    ) -> impl Future<Output = ()> + Send;
    fn notify(
        &self,
        user: &AdminUser,
        change: AdminCredentialChange,
        previous_recipient: Option<String>,
    ) -> impl Future<Output = ()> + Send;
}
Expand description

Where one surface’s record of an operator change goes.

The futures are Send because the web admin awaits them inside an axum handler.

Required Methods§

Source

fn record( &self, build: impl FnOnce(Actor, ClientContext) -> AuditRecord + Send, ) -> impl Future<Output = ()> + Send

Writes one audit row, built from this surface’s actor and client.

Source

fn notify( &self, user: &AdminUser, change: AdminCredentialChange, previous_recipient: Option<String>, ) -> impl Future<Output = ()> + Send

Queues the admin_credential_changed message to the operator user. previous_recipient is the address a contact change replaced.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§