pub struct ResumableUpload { /* private fields */ }Expand description
A handle bound to one resumable upload session.
See the crate-level documentation for more information and examples on using this API.
Implementations§
Source§impl ResumableUpload
impl ResumableUpload
Sourcepub fn token(&self) -> &SessionToken
pub fn token(&self) -> &SessionToken
Returns the session token bound to this upload.
Sourcepub fn progress(&self) -> UploadProgressBuilder
pub fn progress(&self) -> UploadProgressBuilder
Builds a request for the server’s authoritative upload progress.
Sourcepub fn put(&self, offset: u64, chunk: impl Into<Bytes>) -> PutChunkBuilder
pub fn put(&self, offset: u64, chunk: impl Into<Bytes>) -> PutChunkBuilder
Builds a request to write chunk starting at offset.
put doesn’t perform any automatic compression of the payload, so the caller is
responsible for applying compression to the entire payload beforehand and passing chunks
of the already compressed payload to this method.
The returned progress contains the authoritative server offset, which should be used for subsequent requests.
Sourcepub fn cancel(&self) -> CancelUploadBuilder
pub fn cancel(&self) -> CancelUploadBuilder
Builds a request to cancel this upload session, discarding any uploaded bytes.
Trait Implementations§
Source§impl Clone for ResumableUpload
impl Clone for ResumableUpload
Source§fn clone(&self) -> ResumableUpload
fn clone(&self) -> ResumableUpload
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ResumableUpload
impl !UnwindSafe for ResumableUpload
impl Freeze for ResumableUpload
impl Send for ResumableUpload
impl Sync for ResumableUpload
impl Unpin for ResumableUpload
impl UnsafeUnpin for ResumableUpload
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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