Skip to main content

GrantCredentialDyn

Trait GrantCredentialDyn 

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>,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Credential, Error>> + Send + 'a>>;
}
Available on crate feature reqsign only.
Expand description

Dyn version of GrantCredential.

Required Associated Types§

type Credential: SigningCredential

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

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>, ) -> Pin<Box<dyn Future<Output = Result<Self::Credential, Error>> + Send + 'a>>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§