pub struct DropOptionsBuilder { /* private fields */ }Expand description
Builder for DropOptions
Provides a fluent API for constructing drop options.
Implementations§
Source§impl DropOptionsBuilder
impl DropOptionsBuilder
Sourcepub fn file(self, file: FilePayload) -> Self
pub fn file(self, file: FilePayload) -> Self
Add one in-memory file to drop.
Sourcepub fn files(self, files: Vec<FilePayload>) -> Self
pub fn files(self, files: Vec<FilePayload>) -> Self
Set the in-memory files to drop (replaces any already added).
Sourcepub fn data(
self,
mime_type: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn data( self, mime_type: impl Into<String>, value: impl Into<String>, ) -> Self
Add a MIME-typed data entry to drop (e.g. "text/plain" or "text/uri-list").
Sourcepub fn position(self, position: Position) -> Self
pub fn position(self, position: Position) -> Self
Set the point within the element to drop at (relative to top-left corner).
Sourcepub fn build(self) -> DropOptions
pub fn build(self) -> DropOptions
Build the DropOptions
Trait Implementations§
Source§impl Clone for DropOptionsBuilder
impl Clone for DropOptionsBuilder
Source§fn clone(&self) -> DropOptionsBuilder
fn clone(&self) -> DropOptionsBuilder
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 DropOptionsBuilder
impl Debug for DropOptionsBuilder
Source§impl Default for DropOptionsBuilder
impl Default for DropOptionsBuilder
Source§fn default() -> DropOptionsBuilder
fn default() -> DropOptionsBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DropOptionsBuilder
impl RefUnwindSafe for DropOptionsBuilder
impl Send for DropOptionsBuilder
impl Sync for DropOptionsBuilder
impl Unpin for DropOptionsBuilder
impl UnsafeUnpin for DropOptionsBuilder
impl UnwindSafe for DropOptionsBuilder
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