Trait shadow_drive_rust::models::payload::PayloadExt
source · [−]pub trait PayloadExt {
fn prepare_upload<'life0, 'async_trait>(
self,
storage_account_key: &'life0 Pubkey,
file_name: String
) -> Pin<Box<dyn Future<Output = Result<UploadingData, Vec<FileError>>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
}Expand description
PayloadExt is used to implement new data sources that can be used in the Payload enum.
Required Methods
prepare_upload receives a storage account [Pubkey] and a file name. These details are used
in combination with the underlying type to derive:
- data size in bytes
- sha256 of the data
- the url that the file will be accessible at upon successsful upload