audit_logger

Trait ConnectorWithContext

Source
pub trait ConnectorWithContext {
    type Context: ConnectorContext + Hash + Sync + Send + Serialize + Clone + Debug;

    // Required method
    fn context() -> Self::Context;

    // Provided method
    fn hash() -> String { ... }
}
Expand description

Defines an intermediary that allows us to conveniently log ReasonerConnector’s context.

Required Associated Types§

Source

type Context: ConnectorContext + Hash + Sync + Send + Serialize + Clone + Debug

The type returned by [ReasonerConnector::full_context()].

Required Methods§

Source

fn context() -> Self::Context

Returns so-called “full context” about the reasoner connector that is relevant for the audit log.

In particular, this should al least contain the type of the connector used and its version.

Provided Methods§

Source

fn hash() -> String

Returns hash of connector’s context.

If anything about the connector changes that can have an effect on the evaluation of a policy the returned hash must be different

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§