pub struct FileUploadProps {Show 13 fields
pub class: Option<String>,
pub style: Option<String>,
pub children: Option<Box<dyn FnOnce() -> AnyView + Send>>,
pub multiple: Option<bool>,
pub accept: Option<String>,
pub max_size: Option<u64>,
pub max_files: Option<usize>,
pub disabled: Option<bool>,
pub drag_drop_enabled: Option<bool>,
pub on_files_select: Option<Callback<Vec<FileInfo>>>,
pub on_upload_progress: Option<Callback<UploadProgress>>,
pub on_upload_complete: Option<Callback<Vec<FileInfo>>>,
pub on_upload_error: Option<Callback<String>>,
}Expand description
Props for the FileUpload component.
File Upload component - File upload with drag & drop support
§Optional Props
- class:
String - style:
String - children:
Children - multiple:
bool - accept:
String - max_size:
u64 - max_files:
usize - disabled:
bool - drag_drop_enabled:
bool - on_files_select:
Callback<Vec<FileInfo>> - on_upload_progress:
Callback<UploadProgress> - on_upload_complete:
Callback<Vec<FileInfo>> - on_upload_error:
Callback<String>
Fields§
§class: Option<String>§style: Option<String>§children: Option<Box<dyn FnOnce() -> AnyView + Send>>§multiple: Option<bool>§accept: Option<String>§max_size: Option<u64>§max_files: Option<usize>§disabled: Option<bool>§drag_drop_enabled: Option<bool>§on_files_select: Option<Callback<Vec<FileInfo>>>§on_upload_progress: Option<Callback<UploadProgress>>§on_upload_complete: Option<Callback<Vec<FileInfo>>>§on_upload_error: Option<Callback<String>>Implementations§
Source§impl FileUploadProps
impl FileUploadProps
Sourcepub fn builder() -> FileUploadPropsBuilder
pub fn builder() -> FileUploadPropsBuilder
Create a builder for building FileUploadProps.
On the builder, call .class(...)(optional), .style(...)(optional), .children(...)(optional), .multiple(...)(optional), .accept(...)(optional), .max_size(...)(optional), .max_files(...)(optional), .disabled(...)(optional), .drag_drop_enabled(...)(optional), .on_files_select(...)(optional), .on_upload_progress(...)(optional), .on_upload_complete(...)(optional), .on_upload_error(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of FileUploadProps.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileUploadProps
impl !RefUnwindSafe for FileUploadProps
impl Send for FileUploadProps
impl !Sync for FileUploadProps
impl Unpin for FileUploadProps
impl !UnwindSafe for FileUploadProps
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> 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> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.