pub struct UploadList { /* private fields */ }Expand description
A list of files being uploaded, optionally over the zone that took them.
Implementations§
Source§impl UploadList
impl UploadList
pub fn new(ident: impl Into<Ident>) -> Self
pub fn upload(self, upload: Upload) -> Self
pub fn uploads(self, uploads: impl IntoIterator<Item = Upload>) -> Self
Sourcepub fn dropzone(self, zone: Dropzone) -> Self
pub fn dropzone(self, zone: Dropzone) -> Self
The zone the files arrive through, drawn above the list.
Sharing the surface is the point: a payload the zone refuses while it is being dragged and a file the host refused after it landed are the same refusal, said in the same place.
Sourcepub fn show_overall(self, show: bool) -> Self
pub fn show_overall(self, show: bool) -> Self
Whether the batch progress bar is drawn at all.
Sourcepub fn on_retry(
self,
handler: impl Fn(SharedString, &mut Window, &mut App) + 'static,
) -> Self
pub fn on_retry( self, handler: impl Fn(SharedString, &mut Window, &mut App) + 'static, ) -> Self
Reports a file that should be tried again. The list retries nothing.
A refused file never gets this control, whatever the handler says.
Sourcepub fn on_cancel(
self,
handler: impl Fn(SharedString, &mut Window, &mut App) + 'static,
) -> Self
pub fn on_cancel( self, handler: impl Fn(SharedString, &mut Window, &mut App) + 'static, ) -> Self
Reports a file that should be stopped. Offered only while one is still on its way or waiting to be.
Sourcepub fn on_remove(
self,
handler: impl Fn(SharedString, &mut Window, &mut App) + 'static,
) -> Self
pub fn on_remove( self, handler: impl Fn(SharedString, &mut Window, &mut App) + 'static, ) -> Self
Reports a file that should leave the list. Offered only once nothing more is going to happen to it.
Sourcepub fn overall(&self) -> OverallProgress
pub fn overall(&self) -> OverallProgress
How much of the batch is done.
Known only when every file still in flight declared an extent. A single file uploading against an unknown length takes the whole batch to indeterminate, because a total assembled from a number nobody has is not a total.
Trait Implementations§
Source§impl Debug for UploadList
impl Debug for UploadList
Source§impl Disableable for UploadList
impl Disableable for UploadList
Source§impl IntoElement for UploadList
impl IntoElement for UploadList
Source§type Element = ViewElement<UploadList>
type Element = ViewElement<UploadList>
Source§fn into_element(self) -> Self::Element
fn into_element(self) -> Self::Element
Element.Source§fn into_any_element(self) -> AnyElement
fn into_any_element(self) -> AnyElement
AnyElement.Source§impl RenderOnce for UploadList
impl RenderOnce for UploadList
Source§fn render(self, _window: &mut Window, cx: &mut App) -> impl IntoElement
fn render(self, _window: &mut Window, cx: &mut App) -> impl IntoElement
Render::render() method
which takes a mutable reference.Auto Trait Implementations§
impl !RefUnwindSafe for UploadList
impl !Send for UploadList
impl !Sync for UploadList
impl !UnwindSafe for UploadList
impl Freeze for UploadList
impl Unpin for UploadList
impl UnsafeUnpin for UploadList
Blanket Implementations§
Source§impl<E> AnimationExt for Ewhere
E: IntoElement + 'static,
impl<E> AnimationExt for Ewhere
E: IntoElement + 'static,
Source§fn with_animation(
self,
id: impl Into<ElementId>,
animation: Animation,
animator: impl Fn(Self, f32) -> Self + 'static,
) -> AnimationElement<Self>where
Self: Sized,
fn with_animation(
self,
id: impl Into<ElementId>,
animation: Animation,
animator: impl Fn(Self, f32) -> Self + 'static,
) -> AnimationElement<Self>where
Self: Sized,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<E> Flipping for Ewhere
E: IntoElement,
impl<E> Flipping for Ewhere
E: IntoElement,
Source§impl<T> FluentBuilder for Twhere
T: IntoElement,
impl<T> FluentBuilder for Twhere
T: IntoElement,
Source§fn map<U>(self, f: impl FnOnce(Self) -> U) -> Uwhere
Self: Sized,
fn map<U>(self, f: impl FnOnce(Self) -> U) -> Uwhere
Self: Sized,
Source§fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Selfwhere
Self: Sized,
fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Selfwhere
Self: Sized,
Source§fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Selfwhere
Self: Sized,
fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Selfwhere
Self: Sized,
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> ⓘ
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> ⓘ
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