pub trait Signer:
Send
+ Sync
+ Debug
+ 'static {
// Required method
fn signed_url<'life0, 'life1, 'async_trait>(
&'life0 self,
method: Method,
path: &'life1 Path,
expires_in: Duration,
) -> Pin<Box<dyn Future<Output = Result<Url>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn signed_url_opts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
method: Method,
path: &'life1 Path,
expires_in: Duration,
options: &'life2 SignedUrlOptions,
) -> Pin<Box<dyn Future<Output = Result<Url>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn signed_urls<'life0, 'life1, 'async_trait>(
&'life0 self,
method: Method,
paths: &'life1 [Path],
expires_in: Duration,
) -> Pin<Box<dyn Future<Output = Result<Vec<Url>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}cloud-base only.Expand description
Universal API to generate presigned URLs from multiple object store services.
Required Methods§
Sourcefn signed_url<'life0, 'life1, 'async_trait>(
&'life0 self,
method: Method,
path: &'life1 Path,
expires_in: Duration,
) -> Pin<Box<dyn Future<Output = Result<Url>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn signed_url<'life0, 'life1, 'async_trait>(
&'life0 self,
method: Method,
path: &'life1 Path,
expires_in: Duration,
) -> Pin<Box<dyn Future<Output = Result<Url>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Given the intended Method and Path to use and the desired length of time for which
the URL should be valid, return a signed Url created with the object store
implementation’s credentials such that the URL can be handed to something that doesn’t have
access to the object store’s credentials, to allow limited access to the object store.
Provided Methods§
Sourcefn signed_url_opts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
method: Method,
path: &'life1 Path,
expires_in: Duration,
options: &'life2 SignedUrlOptions,
) -> Pin<Box<dyn Future<Output = Result<Url>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn signed_url_opts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
method: Method,
path: &'life1 Path,
expires_in: Duration,
options: &'life2 SignedUrlOptions,
) -> Pin<Box<dyn Future<Output = Result<Url>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Like Signer::signed_url, but additionally folds the query parameters and headers in
options into the signature. See SignedUrlOptions.
This presigns a single request (for example one multipart UploadPart). Orchestrating a
multipart upload — creating and completing it — is not in scope and is typically done by
the credential-holding server via MultipartStore.
The default implementation delegates to Signer::signed_url when options is empty, and
otherwise returns crate::Error::NotSupported: implementations that do not support
signing additional query parameters or headers must not silently drop them, as that would
produce a URL that does not enforce the requested constraints.
There is intentionally no signed_urls_opts batch counterpart: signed parameters such as
partNumber are per-request, so a batch sharing one set of options across many paths has
no clear meaning.
Sourcefn signed_urls<'life0, 'life1, 'async_trait>(
&'life0 self,
method: Method,
paths: &'life1 [Path],
expires_in: Duration,
) -> Pin<Box<dyn Future<Output = Result<Vec<Url>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn signed_urls<'life0, 'life1, 'async_trait>(
&'life0 self,
method: Method,
paths: &'life1 [Path],
expires_in: Duration,
) -> Pin<Box<dyn Future<Output = Result<Vec<Url>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Generate signed urls for multiple paths.
See Signer::signed_url for more details.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".