pub struct HitCandidate {
pub id: WidgetId,
pub distance: f32,
pub outset: f32,
}Expand description
One node the miss-only slop pass considered, and how far away it was.
Produced by
WidgetArena::hit_candidates,
which is public so a test — and the target-conformance audit — can inspect
the pass’s reasoning rather than only its verdict.
Fields§
§id: WidgetIdThe node that offered itself.
distance: f32Distance from the pointer to the node’s uninflated shape, in screen
dp (a local distance under a transform is converted by
min_singular_value).
outset: f32The outset this node earned from its resolved HitSlop, in screen dp.
A candidate is only ever reported when distance <= outset.
Trait Implementations§
Source§impl Clone for HitCandidate
impl Clone for HitCandidate
Source§fn clone(&self) -> HitCandidate
fn clone(&self) -> HitCandidate
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 HitCandidate
Source§impl Debug for HitCandidate
impl Debug for HitCandidate
Source§impl PartialEq for HitCandidate
impl PartialEq for HitCandidate
impl StructuralPartialEq for HitCandidate
Auto Trait Implementations§
impl Freeze for HitCandidate
impl RefUnwindSafe for HitCandidate
impl Send for HitCandidate
impl Sync for HitCandidate
impl Unpin for HitCandidate
impl UnsafeUnpin for HitCandidate
impl UnwindSafe for HitCandidate
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