pub struct DropRegionSet {
pub center: bool,
pub top: bool,
pub bottom: bool,
pub leading: bool,
pub trailing: bool,
}Expand description
Which DropRegions a DropTarget
currently exposes. The default (Center only) reproduces the classic
whole-bounds single-zone behaviour.
Fields§
§center: boolWhether the centre region is enabled.
top: boolWhether the top edge region is enabled.
bottom: boolWhether the bottom edge region is enabled.
leading: boolWhether the leading edge region is enabled.
trailing: boolWhether the trailing edge region is enabled.
Implementations§
Source§impl DropRegionSet
impl DropRegionSet
Sourcepub fn none() -> Self
pub fn none() -> Self
An empty set — no region enabled. Enable regions with Self::with.
Sourcepub fn contains(self, region: DropRegion) -> bool
pub fn contains(self, region: DropRegion) -> bool
Is region enabled in this set?
Sourcepub fn with(self, region: DropRegion) -> Self
pub fn with(self, region: DropRegion) -> Self
A copy with region enabled.
Sourcepub fn iter(self) -> impl Iterator<Item = DropRegion>
pub fn iter(self) -> impl Iterator<Item = DropRegion>
The enabled regions, in DropRegion::ALL order.
Trait Implementations§
Source§impl Clone for DropRegionSet
impl Clone for DropRegionSet
Source§fn clone(&self) -> DropRegionSet
fn clone(&self) -> DropRegionSet
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DropRegionSet
Source§impl Debug for DropRegionSet
impl Debug for DropRegionSet
Source§impl Default for DropRegionSet
impl Default for DropRegionSet
impl Eq for DropRegionSet
Source§impl PartialEq for DropRegionSet
impl PartialEq for DropRegionSet
impl StructuralPartialEq for DropRegionSet
Auto Trait Implementations§
impl Freeze for DropRegionSet
impl RefUnwindSafe for DropRegionSet
impl Send for DropRegionSet
impl Sync for DropRegionSet
impl Unpin for DropRegionSet
impl UnsafeUnpin for DropRegionSet
impl UnwindSafe for DropRegionSet
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
Mutably borrows from an owned value. Read more