Skip to main content

LiveAuthorizer

Trait LiveAuthorizer 

Source
pub trait LiveAuthorizer: Send + Sync {
    // Required method
    fn authorize(
        &self,
        request: &AuthorizationRequest,
    ) -> Result<Option<DispatchAnswer>, String>;

    // Provided method
    fn authorize_acquisition(
        &self,
        _request: &AcquisitionAuthorizationRequest,
    ) -> Result<Option<DispatchAnswer>, String> { ... }
}
Expand description

The host’s authorization seam (spec 026, 3.3). Rustev mints no token: the host decides, from its own trusted facts, whether this exact attempt may be sent. Ok(None) is no answer (missing); Err is a failure of the authorizer (errored); a panic is contained and errored. Every one of them prevents dispatch.

Required Methods§

Provided Methods§

Source

fn authorize_acquisition( &self, _request: &AcquisitionAuthorizationRequest, ) -> Result<Option<DispatchAnswer>, String>

Source dispatch is independently authorized. Existing hosts refuse it.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§