#[repr(u32)]pub enum TouchResponseType {
No = 1,
Maybe = 2,
MaybePrioritize = 3,
MaybeSuppress = 4,
MaybePrioritizeSuppress = 5,
Hold = 6,
HoldSuppress = 7,
Yes = 8,
YesPrioritize = 9,
}
Expand description
The possible interaction dispositions that a client can respond with to a given |TouchPointerSample|. Used as part of a gesture disambiguation scheme.
The responses are based on the idea of an ownership claim on a interaction. Clients may assert a claim of ownership on an open interaction, but only one client’s claim is granted by the server; other clients’ claims are denied.
Variants§
No = 1
The client has no further interest in this interaction; it declines ownership of the interaction. The client will stop receiving events for this interaction.
Maybe = 2
The client is interested in this interaction, but needs to see more events to decide; the client has not yet claimed ownership of this interaction.
MaybePrioritize = 3
The client is interested in this interaction, but needs to see more events to decide; the client has not yet claimed ownership of the interaction. During ownership resolution, it exerts its priority over lower-priority “maybe” claims, but always loses to a “yes” claim.
MaybeSuppress = 4
The client is interested in this interaction, but needs to see more events to decide; the client has not yet claimed ownership of the interaction. Moreover, it suppresses lower-priority claims that try to resolve interaction ownership.
MaybePrioritizeSuppress = 5
The client is interested in this interaction, but needs to see more events to decide; the client has not yet claimed ownership of the interaction. Moreover, it suppresses lower-priority claims that try to resolve interaction ownership. During ownership resolution, it exerts its priority over lower-priority “maybe” claims, but always loses to a “yes” claim.
Hold = 6
The client is interested in this interaction, but needs to see a subsequent interaction to decide; the client has not yet claimed ownership of this interaction. It prevents ownership resolution when the interaction closes.
HoldSuppress = 7
The client is interested in this interaction, but needs to see a subsequent interaction to decide; the client has not yet claimed ownership of this interaction. It prevents ownership resolution when the interaction closes. Moreover, it suppresses lower-priority claims that try to resolve interaction ownership.
Yes = 8
The client wishes exclusive access to the remaining events in this interaction; it claims ownership of this interaction (but that claim may be granted or denied). During ownership resolution, it yields its priority to lower-priority “yes” claims.
YesPrioritize = 9
The client wishes exclusive access to the remaining events in this interaction; it claims ownership of this interaction (but that claim may be granted or denied). During ownership resolution, it exerts its priority over lower-priority “yes” claims.
Implementations§
source§impl TouchResponseType
impl TouchResponseType
pub fn from_primitive(prim: u32) -> Option<Self>
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
is_unknown
Trait Implementations§
source§impl Clone for TouchResponseType
impl Clone for TouchResponseType
source§fn clone(&self) -> TouchResponseType
fn clone(&self) -> TouchResponseType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TouchResponseType
impl Debug for TouchResponseType
source§impl<D: ResourceDialect> Decode<TouchResponseType, D> for TouchResponseType
impl<D: ResourceDialect> Decode<TouchResponseType, D> for TouchResponseType
source§impl<D: ResourceDialect> Encode<TouchResponseType, D> for TouchResponseType
impl<D: ResourceDialect> Encode<TouchResponseType, D> for TouchResponseType
source§impl Hash for TouchResponseType
impl Hash for TouchResponseType
source§impl Ord for TouchResponseType
impl Ord for TouchResponseType
source§fn cmp(&self, other: &TouchResponseType) -> Ordering
fn cmp(&self, other: &TouchResponseType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for TouchResponseType
impl PartialEq for TouchResponseType
source§fn eq(&self, other: &TouchResponseType) -> bool
fn eq(&self, other: &TouchResponseType) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for TouchResponseType
impl PartialOrd for TouchResponseType
source§fn partial_cmp(&self, other: &TouchResponseType) -> Option<Ordering>
fn partial_cmp(&self, other: &TouchResponseType) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl TypeMarker for TouchResponseType
impl TypeMarker for TouchResponseType
§type Owned = TouchResponseType
type Owned = TouchResponseType
source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read moresource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.source§impl ValueTypeMarker for TouchResponseType
impl ValueTypeMarker for TouchResponseType
§type Borrowed<'a> = TouchResponseType
type Borrowed<'a> = TouchResponseType
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Copy for TouchResponseType
impl Eq for TouchResponseType
impl StructuralPartialEq for TouchResponseType
Auto Trait Implementations§
impl Freeze for TouchResponseType
impl RefUnwindSafe for TouchResponseType
impl Send for TouchResponseType
impl Sync for TouchResponseType
impl Unpin for TouchResponseType
impl UnwindSafe for TouchResponseType
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)