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

pub struct DataTransferItemList(_);

The DataTransferItemList object is a list of DataTransferItem objects representing items being dragged. During a drag operation, each DragEvent has a dataTransfer property and that property is a DataTransferItemList.

(Javascript docs)

Methods

impl DataTransferItemList[src]

pub fn len(&self) -> u32[src]

An unsigned long that is the number of drag items in the list.

(Javascript docs)

pub fn add_string(
    &self,
    data: &str,
    ty: &str
) -> Result<Option<DataTransferItem>, NotSupportedError>
[src]

Adds an item of kind "string" to the drag item list and returns a DataTransferItem object for the new item.

(Javascript docs)

pub fn add_file(&self, file: &File) -> Option<DataTransferItem>[src]

Adds an item of kind "file" to the drag item list and returns a DataTransferItem object for the new item.

(Javascript docs)

pub fn remove(&self, index: u32) -> Result<(), InvalidStateError>[src]

Removes the drag item from the list at the given index.

(Javascript docs)

pub fn clear(&self)[src]

Removes all of the drag items from the list.

(Javascript docs)

pub fn index(&self, index: u32) -> Option<DataTransferItem>[src]

Getter that returns a DataTransferItem at the given index.

(Javascript docs)

pub fn iter(&self) -> DataTransferItemIter[src]

Returns an iterator over the list

Trait Implementations

impl JsSerialize for DataTransferItemList[src]

impl TryFrom<DataTransferItemList> for Reference[src]

type Error = Void

The type returned in the event of a conversion error.

impl TryFrom<Reference> for DataTransferItemList[src]

type Error = ConversionError

The type returned in the event of a conversion error.

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

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Value> for DataTransferItemList[src]

type Error = ConversionError

The type returned in the event of a conversion error.

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

type Error = ConversionError

The type returned in the event of a conversion error.

impl InstanceOf for DataTransferItemList[src]

impl ReferenceType for DataTransferItemList[src]

impl AsRef<Reference> for DataTransferItemList[src]

impl From<DataTransferItemList> for Reference[src]

impl IntoIterator for DataTransferItemList[src]

type Item = DataTransferItem

The type of the elements being iterated over.

type IntoIter = DataTransferItemIter

Which kind of iterator are we turning this into?

impl<'a> IntoIterator for &'a DataTransferItemList[src]

type Item = DataTransferItem

The type of the elements being iterated over.

type IntoIter = DataTransferItemIter

Which kind of iterator are we turning this into?

impl Clone for DataTransferItemList[src]

impl Eq for DataTransferItemList[src]

impl PartialEq<DataTransferItemList> for DataTransferItemList[src]

impl Debug for DataTransferItemList[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<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

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]