pub struct ExternalDataKinds(/* private fields */);Expand description
别的应用拖来的内容有哪几种,见 crate::Element::on_external_drag_over。有文件时只算文件(访达拖文件时也带着文件名的文字)
Implementations§
Source§impl ExternalDataKinds
impl ExternalDataKinds
Sourcepub const TEXT: ExternalDataKinds
pub const TEXT: ExternalDataKinds
文字
Sourcepub const LINK: ExternalDataKinds
pub const LINK: ExternalDataKinds
链接
Sourcepub const IMAGE: ExternalDataKinds
pub const IMAGE: ExternalDataKinds
图片
Sourcepub const FILES: ExternalDataKinds
pub const FILES: ExternalDataKinds
文件
Sourcepub const RICH_TEXT: ExternalDataKinds
pub const RICH_TEXT: ExternalDataKinds
带格式的文字
Sourcepub const CUSTOM: ExternalDataKinds
pub const CUSTOM: ExternalDataKinds
应用登记过的自己定的格式(accept_drop_format)里至少有一种
Source§impl ExternalDataKinds
impl ExternalDataKinds
Sourcepub const fn empty() -> ExternalDataKinds
pub const fn empty() -> ExternalDataKinds
Get a flags value with all bits unset.
Sourcepub const fn all() -> ExternalDataKinds
pub const fn all() -> ExternalDataKinds
Get a flags value with all known bits set.
Sourcepub const fn bits(&self) -> u8
pub const fn bits(&self) -> u8
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
Sourcepub const fn from_bits(bits: u8) -> Option<ExternalDataKinds>
pub const fn from_bits(bits: u8) -> Option<ExternalDataKinds>
Convert from a bits value.
This method will return None if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: u8) -> ExternalDataKinds
pub const fn from_bits_truncate(bits: u8) -> ExternalDataKinds
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: u8) -> ExternalDataKinds
pub const fn from_bits_retain(bits: u8) -> ExternalDataKinds
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<ExternalDataKinds>
pub fn from_name(name: &str) -> Option<ExternalDataKinds>
Get a flags value with the bits of a flag with the given name set.
This method will return None if name is empty or doesn’t
correspond to any named flag.
Sourcepub const fn intersects(&self, other: ExternalDataKinds) -> bool
pub const fn intersects(&self, other: ExternalDataKinds) -> bool
Whether any set bits in other are also set in self.
Sourcepub const fn contains(&self, other: ExternalDataKinds) -> bool
pub const fn contains(&self, other: ExternalDataKinds) -> bool
Whether all set bits in other are also set in self.
Sourcepub fn insert(&mut self, other: ExternalDataKinds)
pub fn insert(&mut self, other: ExternalDataKinds)
The bitwise or (|) of the bits in self and other.
Sourcepub fn remove(&mut self, other: ExternalDataKinds)
pub fn remove(&mut self, other: ExternalDataKinds)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
remove won’t truncate other, but the ! operator will.
Sourcepub fn toggle(&mut self, other: ExternalDataKinds)
pub fn toggle(&mut self, other: ExternalDataKinds)
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub fn set(&mut self, other: ExternalDataKinds, value: bool)
pub fn set(&mut self, other: ExternalDataKinds, value: bool)
Call insert when value is true or remove when value is false.
Sourcepub const fn intersection(self, other: ExternalDataKinds) -> ExternalDataKinds
pub const fn intersection(self, other: ExternalDataKinds) -> ExternalDataKinds
The bitwise and (&) of the bits in self and other.
Sourcepub const fn union(self, other: ExternalDataKinds) -> ExternalDataKinds
pub const fn union(self, other: ExternalDataKinds) -> ExternalDataKinds
The bitwise or (|) of the bits in self and other.
Sourcepub const fn difference(self, other: ExternalDataKinds) -> ExternalDataKinds
pub const fn difference(self, other: ExternalDataKinds) -> ExternalDataKinds
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Sourcepub const fn symmetric_difference(
self,
other: ExternalDataKinds,
) -> ExternalDataKinds
pub const fn symmetric_difference( self, other: ExternalDataKinds, ) -> ExternalDataKinds
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub const fn complement(self) -> ExternalDataKinds
pub const fn complement(self) -> ExternalDataKinds
The bitwise negation (!) of the bits in self, truncating the result.
Source§impl ExternalDataKinds
impl ExternalDataKinds
Sourcepub const fn iter(&self) -> Iter<ExternalDataKinds> ⓘ
pub const fn iter(&self) -> Iter<ExternalDataKinds> ⓘ
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
Sourcepub const fn iter_names(&self) -> IterNames<ExternalDataKinds> ⓘ
pub const fn iter_names(&self) -> IterNames<ExternalDataKinds> ⓘ
Yield a set of contained named flags values.
This method is like iter, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
Source§impl Binary for ExternalDataKinds
impl Binary for ExternalDataKinds
Source§impl BitAnd for ExternalDataKinds
impl BitAnd for ExternalDataKinds
Source§fn bitand(self, other: ExternalDataKinds) -> ExternalDataKinds
fn bitand(self, other: ExternalDataKinds) -> ExternalDataKinds
The bitwise and (&) of the bits in self and other.
Source§type Output = ExternalDataKinds
type Output = ExternalDataKinds
& operator.Source§impl BitAndAssign for ExternalDataKinds
impl BitAndAssign for ExternalDataKinds
Source§fn bitand_assign(&mut self, other: ExternalDataKinds)
fn bitand_assign(&mut self, other: ExternalDataKinds)
The bitwise and (&) of the bits in self and other.
Source§impl BitOr for ExternalDataKinds
impl BitOr for ExternalDataKinds
Source§fn bitor(self, other: ExternalDataKinds) -> ExternalDataKinds
fn bitor(self, other: ExternalDataKinds) -> ExternalDataKinds
The bitwise or (|) of the bits in self and other.
Source§type Output = ExternalDataKinds
type Output = ExternalDataKinds
| operator.Source§impl BitOrAssign for ExternalDataKinds
impl BitOrAssign for ExternalDataKinds
Source§fn bitor_assign(&mut self, other: ExternalDataKinds)
fn bitor_assign(&mut self, other: ExternalDataKinds)
The bitwise or (|) of the bits in self and other.
Source§impl BitXor for ExternalDataKinds
impl BitXor for ExternalDataKinds
Source§fn bitxor(self, other: ExternalDataKinds) -> ExternalDataKinds
fn bitxor(self, other: ExternalDataKinds) -> ExternalDataKinds
The bitwise exclusive-or (^) of the bits in self and other.
Source§type Output = ExternalDataKinds
type Output = ExternalDataKinds
^ operator.Source§impl BitXorAssign for ExternalDataKinds
impl BitXorAssign for ExternalDataKinds
Source§fn bitxor_assign(&mut self, other: ExternalDataKinds)
fn bitxor_assign(&mut self, other: ExternalDataKinds)
The bitwise exclusive-or (^) of the bits in self and other.
Source§impl Clone for ExternalDataKinds
impl Clone for ExternalDataKinds
Source§fn clone(&self) -> ExternalDataKinds
fn clone(&self) -> ExternalDataKinds
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ExternalDataKinds
Source§impl Debug for ExternalDataKinds
impl Debug for ExternalDataKinds
Source§impl Default for ExternalDataKinds
impl Default for ExternalDataKinds
Source§fn default() -> ExternalDataKinds
fn default() -> ExternalDataKinds
impl Eq for ExternalDataKinds
Source§impl Extend<ExternalDataKinds> for ExternalDataKinds
impl Extend<ExternalDataKinds> for ExternalDataKinds
Source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = ExternalDataKinds>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = ExternalDataKinds>,
The bitwise or (|) of the bits in each flags value.
Source§fn extend_one(&mut self, item: T)
fn extend_one(&mut self, item: T)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl Flags for ExternalDataKinds
impl Flags for ExternalDataKinds
Source§const FLAGS: &'static [Flag<ExternalDataKinds>]
const FLAGS: &'static [Flag<ExternalDataKinds>]
Source§fn from_bits_retain(bits: u8) -> ExternalDataKinds
fn from_bits_retain(bits: u8) -> ExternalDataKinds
Source§fn all_named() -> ExternalDataKinds
fn all_named() -> ExternalDataKinds
Source§fn known_bits(&self) -> Self::Bits
fn known_bits(&self) -> Self::Bits
Source§fn unknown_bits(&self) -> Self::Bits
fn unknown_bits(&self) -> Self::Bits
Source§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.Source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
Source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
Source§fn iter_names(&self) -> IterNames<Self> ⓘ
fn iter_names(&self) -> IterNames<Self> ⓘ
Source§fn iter_defined_names() -> IterDefinedNames<Self> ⓘ
fn iter_defined_names() -> IterDefinedNames<Self> ⓘ
Self::FLAGS.Source§fn iter_equal_names(&self) -> IterEqualNames<Self> ⓘ
fn iter_equal_names(&self) -> IterEqualNames<Self> ⓘ
Source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.Source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.Source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|) of the bits in self and other.Source§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^) of the bits in self and other.Source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in self and other.Source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
Source§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in self and other.Source§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in self, truncating the result.Source§impl FromIterator<ExternalDataKinds> for ExternalDataKinds
impl FromIterator<ExternalDataKinds> for ExternalDataKinds
Source§fn from_iter<T>(iterator: T) -> ExternalDataKindswhere
T: IntoIterator<Item = ExternalDataKinds>,
fn from_iter<T>(iterator: T) -> ExternalDataKindswhere
T: IntoIterator<Item = ExternalDataKinds>,
The bitwise or (|) of the bits in each flags value.
Source§impl Hash for ExternalDataKinds
impl Hash for ExternalDataKinds
Source§impl IntoIterator for ExternalDataKinds
impl IntoIterator for ExternalDataKinds
Source§type Item = ExternalDataKinds
type Item = ExternalDataKinds
Source§type IntoIter = Iter<ExternalDataKinds>
type IntoIter = Iter<ExternalDataKinds>
Source§fn into_iter(self) -> <ExternalDataKinds as IntoIterator>::IntoIter
fn into_iter(self) -> <ExternalDataKinds as IntoIterator>::IntoIter
Source§impl LowerHex for ExternalDataKinds
impl LowerHex for ExternalDataKinds
Source§impl Not for ExternalDataKinds
impl Not for ExternalDataKinds
Source§fn not(self) -> ExternalDataKinds
fn not(self) -> ExternalDataKinds
The bitwise negation (!) of the bits in self, truncating the result.
Source§type Output = ExternalDataKinds
type Output = ExternalDataKinds
! operator.Source§impl Octal for ExternalDataKinds
impl Octal for ExternalDataKinds
Source§impl PartialEq for ExternalDataKinds
impl PartialEq for ExternalDataKinds
impl StructuralPartialEq for ExternalDataKinds
Source§impl Sub for ExternalDataKinds
impl Sub for ExternalDataKinds
Source§fn sub(self, other: ExternalDataKinds) -> ExternalDataKinds
fn sub(self, other: ExternalDataKinds) -> ExternalDataKinds
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Source§type Output = ExternalDataKinds
type Output = ExternalDataKinds
- operator.Source§impl SubAssign for ExternalDataKinds
impl SubAssign for ExternalDataKinds
Source§fn sub_assign(&mut self, other: ExternalDataKinds)
fn sub_assign(&mut self, other: ExternalDataKinds)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Auto Trait Implementations§
impl Forget for ExternalDataKinds
impl Freeze for ExternalDataKinds
impl RefUnwindSafe for ExternalDataKinds
impl Send for ExternalDataKinds
impl Sync for ExternalDataKinds
impl Unpin for ExternalDataKinds
impl UnsafeUnpin for ExternalDataKinds
impl UnwindSafe for ExternalDataKinds
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> Brush for T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.