pub struct ResumableUploadHelper<'a, A: 'a> {
    pub client: &'a mut Client,
    pub delegate: &'a mut dyn Delegate,
    pub start_at: Option<u64>,
    pub auth: &'a mut A,
    pub user_agent: &'a str,
    pub auth_header: Authorization<Bearer>,
    pub url: &'a str,
    pub reader: &'a mut dyn ReadSeek,
    pub media_type: Mime,
    pub content_length: u64,
}
Expand description

A utility type to perform a resumable upload from start to end.

Fields§

§client: &'a mut Client§delegate: &'a mut dyn Delegate§start_at: Option<u64>§auth: &'a mut A§user_agent: &'a str§auth_header: Authorization<Bearer>§url: &'a str§reader: &'a mut dyn ReadSeek§media_type: Mime§content_length: u64

Implementations§

source§

impl<'a, A> ResumableUploadHelper<'a, A>where A: GetToken,

source

pub fn upload(&mut self) -> Option<Result<Response>>

returns None if operation was cancelled by delegate, or the HttpResult. It can be that we return the result just because we didn’t understand the status code - caller should check for status himself before assuming it’s OK to use

Auto Trait Implementations§

§

impl<'a, A> !RefUnwindSafe for ResumableUploadHelper<'a, A>

§

impl<'a, A> !Send for ResumableUploadHelper<'a, A>

§

impl<'a, A> !Sync for ResumableUploadHelper<'a, A>

§

impl<'a, A> Unpin for ResumableUploadHelper<'a, A>

§

impl<'a, A> !UnwindSafe for ResumableUploadHelper<'a, A>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Typeable for Twhere T: Any,

§

fn get_type(&self) -> TypeId

Get the TypeId of this object.