Skip to main content

TrustSource

Trait TrustSource 

Source
pub trait TrustSource: Send + Sync {
    // Required method
    fn current(
        &self,
    ) -> impl Future<Output = Result<PinnedTrust, PeeringError>> + Send;
}
Expand description

Where the serving side of a channel reads the trust it authorizes each request against: the account’s directory as this device pins it now, so a peer revoked mid-session is refused at its next request. An implementation that cannot produce current trust returns an error, and the request is refused (fail closed) rather than served under trust that may be stale.

Required Methods§

Source

fn current( &self, ) -> impl Future<Output = Result<PinnedTrust, PeeringError>> + Send

The trust pinned now.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl TrustSource for PinnedTrust

Trust that never changes for the life of the session.

Source§

impl TrustSource for SharedTrust