Skip to main content

SignRequest

Trait SignRequest 

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

    // Required method
    fn sign_request<'a>(
        &'a self,
        ctx: &'a Context,
        req: &'a mut Parts,
        credential: Option<&'a Self::Credential>,
        expires_in: Option<Duration>,
    ) -> impl Future<Output = Result<()>> + MaybeSend + 'a;
}
Expand description

SignRequest is the trait used by signer to build the signing request.

Required Associated Types§

Source

type Credential: Send + Sync + Unpin + 'static

Credential used by this builder.

Typically, it will be a credential.

Required Methods§

Source

fn sign_request<'a>( &'a self, ctx: &'a Context, req: &'a mut Parts, credential: Option<&'a Self::Credential>, expires_in: Option<Duration>, ) -> impl Future<Output = Result<()>> + MaybeSend + 'a

Construct the signing request.

§Credential

The credential parameter is the credential required by the signer to sign the request.

§Expires In

The expires_in parameter specifies the expiration time for the result. If the signer does not support expiration, it should return an error.

Implementation details determine how to handle the expiration logic. For instance, AWS uses a query string that includes an Expires parameter.

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.

Implementations on Foreign Types§

Source§

impl<T> SignRequest for Arc<T>
where T: SignRequestDyn + ?Sized,

Source§

type Credential = <T as SignRequestDyn>::Credential

Source§

async fn sign_request( &self, ctx: &Context, req: &mut Parts, credential: Option<&Self::Credential>, expires_in: Option<Duration>, ) -> Result<()>

Implementors§