pub struct Upload {
pub id: SharedString,
pub name: SharedString,
pub size: Option<SharedString>,
pub state: UploadState,
}Expand description
One file on the list, identified by business identity.
Fields§
§id: SharedString§name: SharedString§size: Option<SharedString>The size, already worded by the host. This crate formats no quantities.
state: UploadStateImplementations§
Source§impl Upload
impl Upload
pub fn new(id: impl Into<SharedString>, name: impl Into<SharedString>) -> Self
Sourcepub fn size(self, size: impl Into<SharedString>) -> Self
pub fn size(self, size: impl Into<SharedString>) -> Self
The size as the host already worded it.
pub fn state(self, state: UploadState) -> Self
pub fn uploading(self, fraction: impl Into<Option<f32>>) -> Self
pub fn done(self) -> Self
pub fn failed(self, reason: impl Into<SharedString>) -> Self
pub fn cancelled(self) -> Self
pub fn refused(self, reason: impl Into<SharedString>) -> Self
Trait Implementations§
impl StructuralPartialEq for Upload
Auto Trait Implementations§
impl Freeze for Upload
impl RefUnwindSafe for Upload
impl Send for Upload
impl Sync for Upload
impl Unpin for Upload
impl UnsafeUnpin for Upload
impl UnwindSafe for Upload
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 more