[][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 AsRef<Reference> for DataTransferItem[src]

impl From<DataTransferItem> for Reference[src]

impl Clone for DataTransferItem[src]

impl Eq for DataTransferItem[src]

impl PartialEq<DataTransferItem> for DataTransferItem[src]

impl Debug for DataTransferItem[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<T> for T[src]

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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