[−][src]Struct stdweb::web::event::DataTransferItem
The DataTransferItem object represents one drag data item. During a drag operation, each drag event has a dataTransfer property which contains a list of drag data items. Each item in the list is a DataTransferItem object.
Methods
impl DataTransferItem
[src]
pub fn kind(&self) -> DataTransferItemKind
[src]
The kind of drag data item, string or file.
pub fn ty(&self) -> String
[src]
The drag data item's type, typically a MIME type.
pub fn get_as_file(&self) -> Option<File>
[src]
Returns the File object associated with the drag data item (or null if the drag item is not a file)
pub fn get_as_string<F>(&self, callback: F) where
F: FnOnce(String) + 'static,
[src]
F: FnOnce(String) + 'static,
Invokes the specified callback with the drag data item string as its argument.
pub fn get_as_string_future(&self) -> Receiver<String>
[src]
Invokes the specified callback with the drag data item string as its argument.
Trait Implementations
impl JsSerialize for DataTransferItem
[src]
impl TryFrom<DataTransferItem> for Reference
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(value: DataTransferItem) -> Result<Self, Self::Error>
[src]
impl TryFrom<Reference> for DataTransferItem
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(reference: Reference) -> Result<Self, Self::Error>
[src]
impl<'_r> TryFrom<&'_r Reference> for DataTransferItem
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(reference: &Reference) -> Result<Self, Self::Error>
[src]
impl TryFrom<Value> for DataTransferItem
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Value) -> Result<Self, Self::Error>
[src]
impl<'_r> TryFrom<&'_r Value> for DataTransferItem
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: &Value) -> Result<Self, Self::Error>
[src]
impl InstanceOf for DataTransferItem
[src]
fn instance_of(reference: &Reference) -> bool
[src]
impl ReferenceType for DataTransferItem
[src]
unsafe fn from_reference_unchecked(reference: Reference) -> Self
[src]
impl AsRef<Reference> for DataTransferItem
[src]
impl From<DataTransferItem> for Reference
[src]
fn from(value: DataTransferItem) -> Self
[src]
impl PartialEq<DataTransferItem> for DataTransferItem
[src]
fn eq(&self, other: &DataTransferItem) -> bool
[src]
fn ne(&self, other: &DataTransferItem) -> bool
[src]
impl Eq for DataTransferItem
[src]
impl Clone for DataTransferItem
[src]
fn clone(&self) -> DataTransferItem
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for DataTransferItem
[src]
Auto Trait Implementations
impl Send for DataTransferItem
impl Sync for DataTransferItem
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,