[−][src]Struct stdweb::web::event::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.
Methods
impl DataTransferItemList
[src]
pub fn len(&self) -> u32
[src]
An unsigned long that is the number of drag items in the list.
pub fn add_string(
&self,
data: &str,
ty: &str
) -> Result<Option<DataTransferItem>, NotSupportedError>
[src]
&self,
data: &str,
ty: &str
) -> Result<Option<DataTransferItem>, NotSupportedError>
Adds an item of kind "string" to the drag item list and returns a DataTransferItem object for the new item.
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.
pub fn remove(&self, index: u32) -> Result<(), InvalidStateError>
[src]
Removes the drag item from the list at the given index.
pub fn clear(&self)
[src]
Removes all of the drag items from the list.
pub fn index(&self, index: u32) -> Option<DataTransferItem>
[src]
Getter that returns a DataTransferItem at the given index.
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.
fn try_from(value: DataTransferItemList) -> Result<Self, Self::Error>
[src]
impl TryFrom<Reference> for DataTransferItemList
[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 DataTransferItemList
[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 DataTransferItemList
[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 DataTransferItemList
[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 DataTransferItemList
[src]
fn instance_of(reference: &Reference) -> bool
[src]
impl ReferenceType for DataTransferItemList
[src]
unsafe fn from_reference_unchecked(reference: Reference) -> Self
[src]
impl AsRef<Reference> for DataTransferItemList
[src]
impl From<DataTransferItemList> for Reference
[src]
fn from(value: DataTransferItemList) -> Self
[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?
fn into_iter(self) -> Self::IntoIter
[src]
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?
fn into_iter(self) -> Self::IntoIter
[src]
impl Clone for DataTransferItemList
[src]
fn clone(&self) -> DataTransferItemList
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Eq for DataTransferItemList
[src]
impl PartialEq<DataTransferItemList> for DataTransferItemList
[src]
fn eq(&self, other: &DataTransferItemList) -> bool
[src]
fn ne(&self, other: &DataTransferItemList) -> bool
[src]
impl Debug for DataTransferItemList
[src]
Auto Trait Implementations
impl Send for DataTransferItemList
impl Sync for DataTransferItemList
impl Unpin for DataTransferItemList
impl UnwindSafe for DataTransferItemList
impl RefUnwindSafe for DataTransferItemList
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
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?
fn into_iter(self) -> I
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,