pub struct ResumableUploadHelper<'a, A: 'a, C>where
C: Connector,{
pub client: &'a Client<C>,
pub delegate: &'a mut dyn Delegate,
pub start_at: Option<u64>,
pub auth: &'a A,
pub user_agent: &'a str,
pub auth_header: String,
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 Client<C>
§delegate: &'a mut dyn Delegate
§start_at: Option<u64>
§auth: &'a A
§user_agent: &'a str
§auth_header: String
§url: &'a str
§reader: &'a mut dyn ReadSeek
§media_type: Mime
§content_length: u64
Implementations§
source§impl<'a, A, C> ResumableUploadHelper<'a, A, C>where
C: Connector,
impl<'a, A, C> ResumableUploadHelper<'a, A, C>where
C: Connector,
sourcepub async fn upload(&mut self) -> Option<Result<Response, Error>>
pub async fn upload(&mut self) -> Option<Result<Response, Error>>
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, C> Freeze for ResumableUploadHelper<'a, A, C>
impl<'a, A, C> !RefUnwindSafe for ResumableUploadHelper<'a, A, C>
impl<'a, A, C> Send for ResumableUploadHelper<'a, A, C>where
A: Sync,
impl<'a, A, C> !Sync for ResumableUploadHelper<'a, A, C>
impl<'a, A, C> Unpin for ResumableUploadHelper<'a, A, C>
impl<'a, A, C> !UnwindSafe for ResumableUploadHelper<'a, A, C>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more