Enum s3_algo::ObjectSource
source · pub enum ObjectSource {
File {
path: PathBuf,
key: String,
},
Data {
data: Vec<u8>,
key: String,
},
}Variants§
Implementations§
source§impl ObjectSource
impl ObjectSource
pub fn file(path: PathBuf, key: String) -> Self
pub fn data<D: Into<Vec<u8>>>(data: D, key: String) -> Self
pub async fn create_stream(&self) -> Result<(ByteStream, usize), Error>
pub async fn create_upload_future<C, R>(
self,
s3: C,
bucket: String,
default: R
) -> Result<(impl Future<Output = Result<(), Error>>, usize), Error>where
C: S3 + Clone,
R: Fn() -> PutObjectRequest + Clone + Unpin + Sync + Send,
pub fn get_key(&self) -> &str
Trait Implementations§
source§impl Clone for ObjectSource
impl Clone for ObjectSource
source§fn clone(&self) -> ObjectSource
fn clone(&self) -> ObjectSource
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more