pub enum UploadState {
Queued,
Uploading {
fraction: Option<f32>,
},
Done,
Failed {
reason: SharedString,
},
Cancelled,
Refused {
reason: SharedString,
},
}Expand description
Where one file has got to.
Variants§
Queued
Accepted and waiting its turn. Nothing has been sent.
Uploading
On its way. fraction is None when nobody knows how much there is
to send, which is a state and not a zero.
Done
Failed
It started and did not finish, in the host’s own words.
Fields
§
reason: SharedStringCancelled
Somebody stopped it. Distinct from failed: nothing went wrong.
Refused
The host would not take it at all, in its own words.
Fields
§
reason: SharedStringImplementations§
Source§impl UploadState
impl UploadState
Sourcepub fn name(&self) -> &'static str
pub fn name(&self) -> &'static str
The name the semantic tree publishes, so a test tells the six apart without reading a colour.
Sourcepub fn is_settled(&self) -> bool
pub fn is_settled(&self) -> bool
Whether anything more is going to happen to this file on its own.
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Whether trying again could end differently. A refusal could not.
Trait Implementations§
Source§impl Clone for UploadState
impl Clone for UploadState
Source§fn clone(&self) -> UploadState
fn clone(&self) -> UploadState
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 moreSource§impl Debug for UploadState
impl Debug for UploadState
Source§impl Default for UploadState
impl Default for UploadState
Source§fn default() -> UploadState
fn default() -> UploadState
Returns the “default value” for a type. Read more
Source§impl PartialEq for UploadState
impl PartialEq for UploadState
impl StructuralPartialEq for UploadState
Auto Trait Implementations§
impl Freeze for UploadState
impl RefUnwindSafe for UploadState
impl Send for UploadState
impl Sync for UploadState
impl Unpin for UploadState
impl UnsafeUnpin for UploadState
impl UnwindSafe for UploadState
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,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().