Enum s3_algo::ObjectSource[][src]

pub enum ObjectSource {
    File {
        path: PathBuf,
        key: String,
    },
    Data {
        data: Vec<u8>,
        key: String,
    },
}

Variants

File
Show fields

Fields of File

path: PathBufkey: String
Data
Show fields

Fields of Data

data: Vec<u8>key: String

Implementations

impl ObjectSource[src]

pub fn file(path: PathBuf, key: String) -> Self[src]

pub fn data<D: Into<Vec<u8>>>(data: D, key: String) -> Self[src]

pub async fn create_stream(&self) -> Result<(ByteStream, u64), Error>[src]

pub async fn create_upload_future<C, R>(
    self,
    s3: C,
    bucket: String,
    default: R
) -> Result<(impl Future<Output = Result<(), Error>>, u64), Error> where
    C: S3 + Clone,
    R: Fn() -> PutObjectRequest + Clone + Unpin + Sync + Send
[src]

pub fn get_key(&self) -> &str[src]

Trait Implementations

impl Clone for ObjectSource[src]

impl Debug for ObjectSource[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.