pub trait VercelBlobApi {
// Required methods
fn list<'life0, 'async_trait>(
&'life0 self,
options: ListCommandOptions,
) -> Pin<Box<dyn Future<Output = Result<ListBlobResult, VercelBlobError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn put<'life0, 'life1, 'async_trait>(
&'life0 self,
pathname: &'life1 str,
body: impl 'async_trait + Into<Body> + Send,
options: PutCommandOptions,
) -> Pin<Box<dyn Future<Output = Result<PutBlobResult, VercelBlobError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn head<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
options: HeadCommandOptions,
) -> Pin<Box<dyn Future<Output = Result<Option<HeadBlobResult>, VercelBlobError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn del<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
options: DelCommandOptions,
) -> Pin<Box<dyn Future<Output = Result<(), VercelBlobError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn download<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
options: DownloadCommandOptions,
) -> Pin<Box<dyn Future<Output = Result<Bytes, VercelBlobError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
Functions defined in the Vercel Blob API
Required Methods§
Sourcefn list<'life0, 'async_trait>(
&'life0 self,
options: ListCommandOptions,
) -> Pin<Box<dyn Future<Output = Result<ListBlobResult, VercelBlobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 self,
options: ListCommandOptions,
) -> Pin<Box<dyn Future<Output = Result<ListBlobResult, VercelBlobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn put<'life0, 'life1, 'async_trait>(
&'life0 self,
pathname: &'life1 str,
body: impl 'async_trait + Into<Body> + Send,
options: PutCommandOptions,
) -> Pin<Box<dyn Future<Output = Result<PutBlobResult, VercelBlobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn put<'life0, 'life1, 'async_trait>(
&'life0 self,
pathname: &'life1 str,
body: impl 'async_trait + Into<Body> + Send,
options: PutCommandOptions,
) -> Pin<Box<dyn Future<Output = Result<PutBlobResult, VercelBlobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn head<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
options: HeadCommandOptions,
) -> Pin<Box<dyn Future<Output = Result<Option<HeadBlobResult>, VercelBlobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn head<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
options: HeadCommandOptions,
) -> Pin<Box<dyn Future<Output = Result<Option<HeadBlobResult>, VercelBlobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Gets the metadata for a file in the blob store
§Arguments
url
- The URL of the file to get metadata for. This should be the same URL that is used to download the file.options
- Options for the head operation
§Returns
If the file exists then the metadata for the file is returned. If the file does not exist then None is returned.
Sourcefn del<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
options: DelCommandOptions,
) -> Pin<Box<dyn Future<Output = Result<(), VercelBlobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn del<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
options: DelCommandOptions,
) -> Pin<Box<dyn Future<Output = Result<(), VercelBlobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
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.