Skip to main content

GrantCredentialDyn

Trait GrantCredentialDyn 

Source
pub trait GrantCredentialDyn:
    Debug
    + Send
    + Sync
    + Unpin
    + 'static {
    type Credential: SigningCredential;

    // Required methods
    fn required_valid_until_dyn(
        &self,
        credential: &Self::Credential,
        expires_in: Option<Duration>,
    ) -> Timestamp;
    fn grant_credential_dyn<'a>(
        &'a self,
        ctx: &'a Context,
        credential: &'a Self::Credential,
        expires_in: Option<Duration>,
    ) -> BoxedFuture<'a, Result<Self::Credential>>;
}
Expand description

Dyn version of GrantCredential.

Required Associated Types§

Source

type Credential: SigningCredential

Credential used as the source and returned as the granted result.

Required Methods§

Source

fn required_valid_until_dyn( &self, credential: &Self::Credential, expires_in: Option<Duration>, ) -> Timestamp

Source

fn grant_credential_dyn<'a>( &'a self, ctx: &'a Context, credential: &'a Self::Credential, expires_in: Option<Duration>, ) -> BoxedFuture<'a, Result<Self::Credential>>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§