[][src]Struct stdweb::web::event::DataTransferItem

pub struct 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.

(Javascript docs)

Methods

impl DataTransferItem
[src]

pub fn kind(&self) -> DataTransferItemKind
[src]

The kind of drag data item, string or file.

(Javascript docs)

pub fn ty(&self) -> String
[src]

The drag data item's type, typically a MIME type.

(Javascript docs)

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)

(Javascript docs)

pub fn get_as_string<F>(&self, callback: F) where
    F: FnOnce(String) + 'static, 
[src]

Invokes the specified callback with the drag data item string as its argument.

(Javascript docs)

pub fn get_as_string_future(&self) -> Receiver<String>
[src]

Invokes the specified callback with the drag data item string as its argument.

(Javascript docs)

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.

impl TryFrom<Reference> for DataTransferItem
[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<'_r> TryFrom<&'_r Reference> for DataTransferItem
[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Value> for DataTransferItem
[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<'_r> TryFrom<&'_r Value> for DataTransferItem
[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl InstanceOf for DataTransferItem
[src]

impl ReferenceType for DataTransferItem
[src]

impl From<DataTransferItem> for Reference
[src]

impl Eq for DataTransferItem
[src]

impl PartialEq<DataTransferItem> for DataTransferItem
[src]

impl AsRef<Reference> for DataTransferItem
[src]

impl Clone for 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

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]