#[repr(u32)]pub enum DispatchPolicy {
ExclusiveTarget = 1,
TopHitAndAncestorsInTarget = 2,
MouseHoverAndLatchInTarget = 3,
}Expand description
A specification of the UI clients that may have injected events dispatched to them in an |Target|. One is specified in |Config|.
A useful concept is “latching”, where one or more clients may start receiving the pointer event stream, prior to assignment of stream ownership. After ownership is assigned (e.g., through a gesture disambiguation protocol), non-owning clients have their latch terminated – they stop receiving the pointer event stream.
- A client’s latch does not itself confer stream ownership (receiving the entire pointer event stream); gesture disambiguation or device termination may prematurely end the stream dispatched to that client.
- It’s possible for a client to latch while hidden from the user (i.e., manipulate a surface that is invisible to the user), where the occluding surface is owned by a client outside of |Target|. Conversely, these occluding clients cannot latch, because latched clients must be in |Target|’s view tree.
Variants§
Trait Implementations§
Source§impl Clone for DispatchPolicy
impl Clone for DispatchPolicy
Source§fn clone(&self) -> DispatchPolicy
fn clone(&self) -> DispatchPolicy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DispatchPolicy
impl Debug for DispatchPolicy
Source§impl<'a, ___E> Encode<DispatchPolicy, ___E> for &'a DispatchPolicywhere
___E: ?Sized,
impl<'a, ___E> Encode<DispatchPolicy, ___E> for &'a DispatchPolicywhere
___E: ?Sized,
Source§fn encode(
self,
encoder: &mut ___E,
out: &mut MaybeUninit<DispatchPolicy>,
_: (),
) -> Result<(), EncodeError>
fn encode( self, encoder: &mut ___E, out: &mut MaybeUninit<DispatchPolicy>, _: (), ) -> Result<(), EncodeError>
Encodes this value into an encoder and output.
§const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
Source§impl<___E> Encode<DispatchPolicy, ___E> for DispatchPolicywhere
___E: ?Sized,
impl<___E> Encode<DispatchPolicy, ___E> for DispatchPolicywhere
___E: ?Sized,
Source§fn encode(
self,
encoder: &mut ___E,
out: &mut MaybeUninit<DispatchPolicy>,
_: (),
) -> Result<(), EncodeError>
fn encode( self, encoder: &mut ___E, out: &mut MaybeUninit<DispatchPolicy>, _: (), ) -> Result<(), EncodeError>
Encodes this value into an encoder and output.
§const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
Source§impl From<DispatchPolicy> for DispatchPolicy
impl From<DispatchPolicy> for DispatchPolicy
Source§fn from(wire: DispatchPolicy) -> Self
fn from(wire: DispatchPolicy) -> Self
Converts to this type from the input type.
Source§impl From<DispatchPolicy> for DispatchPolicy
impl From<DispatchPolicy> for DispatchPolicy
Source§fn from(natural: DispatchPolicy) -> Self
fn from(natural: DispatchPolicy) -> Self
Converts to this type from the input type.
Source§impl FromWire<DispatchPolicy> for DispatchPolicy
impl FromWire<DispatchPolicy> for DispatchPolicy
Source§fn from_wire(wire: DispatchPolicy) -> Self
fn from_wire(wire: DispatchPolicy) -> Self
Converts the given owned value to this type.
§const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
Source§impl FromWireRef<DispatchPolicy> for DispatchPolicy
impl FromWireRef<DispatchPolicy> for DispatchPolicy
Source§fn from_wire_ref(wire: &DispatchPolicy) -> Self
fn from_wire_ref(wire: &DispatchPolicy) -> Self
Converts the given reference to this type.
Source§impl Hash for DispatchPolicy
impl Hash for DispatchPolicy
Source§impl Ord for DispatchPolicy
impl Ord for DispatchPolicy
Source§fn cmp(&self, other: &DispatchPolicy) -> Ordering
fn cmp(&self, other: &DispatchPolicy) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for DispatchPolicy
impl PartialEq for DispatchPolicy
Source§impl PartialOrd for DispatchPolicy
impl PartialOrd for DispatchPolicy
Source§impl TryFrom<u32> for DispatchPolicy
impl TryFrom<u32> for DispatchPolicy
impl Copy for DispatchPolicy
impl Eq for DispatchPolicy
impl StructuralPartialEq for DispatchPolicy
Auto Trait Implementations§
impl Freeze for DispatchPolicy
impl RefUnwindSafe for DispatchPolicy
impl Send for DispatchPolicy
impl Sync for DispatchPolicy
impl Unpin for DispatchPolicy
impl UnsafeUnpin for DispatchPolicy
impl UnwindSafe for DispatchPolicy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, W> FromWireOption<Box<'_, W>> for Twhere
T: FromWire<W>,
impl<T, W> FromWireOption<Box<'_, W>> for Twhere
T: FromWire<W>,
§fn from_wire_option(wire: Box<'_, W>) -> Option<T>
fn from_wire_option(wire: Box<'_, W>) -> Option<T>
Converts the given owned value to an option of this type.
§impl<T, W> FromWireOptionRef<Box<'_, W>> for Twhere
T: FromWireRef<W>,
impl<T, W> FromWireOptionRef<Box<'_, W>> for Twhere
T: FromWireRef<W>,
§fn from_wire_option_ref(wire: &Box<'_, W>) -> Option<T>
fn from_wire_option_ref(wire: &Box<'_, W>) -> Option<T>
Converts the given reference to an option of this type.
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]