pub struct ContactEvidence { /* private fields */ }Expand description
How much of a subject’s face is in contact, and with what.
Implementations§
Source§impl ContactEvidence
impl ContactEvidence
Sourcepub fn try_new(
request: ContactRequest,
whole_area_square_metres: f64,
contact_area_square_metres: f64,
nearest_distance_metres: Option<f64>,
touching: Vec<ObjectId>,
evidence: Evidence,
) -> Result<Self, ContactError>
pub fn try_new( request: ContactRequest, whole_area_square_metres: f64, contact_area_square_metres: f64, nearest_distance_metres: Option<f64>, touching: Vec<ObjectId>, evidence: Evidence, ) -> Result<Self, ContactError>
Rejects incoherent areas and unreviewable evidence, so an adapter cannot launder an estimate into the engine as fact.
pub fn request(&self) -> &ContactRequest
pub fn whole_area_square_metres(&self) -> f64
pub fn contact_area_square_metres(&self) -> f64
Sourcepub fn nearest_distance_metres(&self) -> Option<f64>
pub fn nearest_distance_metres(&self) -> Option<f64>
Distance to the nearest candidate when nothing is touching.
pub fn evidence(&self) -> &Evidence
Sourcepub fn contact_ratio(&self) -> f64
pub fn contact_ratio(&self) -> f64
Fraction of the face in contact, computed exactly.
The divisor is validated positive in Self::try_new, so this cannot
divide by zero.
Trait Implementations§
Source§impl Clone for ContactEvidence
impl Clone for ContactEvidence
Source§fn clone(&self) -> ContactEvidence
fn clone(&self) -> ContactEvidence
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 moreSource§impl Debug for ContactEvidence
impl Debug for ContactEvidence
Source§impl PartialEq for ContactEvidence
impl PartialEq for ContactEvidence
impl StructuralPartialEq for ContactEvidence
Auto Trait Implementations§
impl Freeze for ContactEvidence
impl RefUnwindSafe for ContactEvidence
impl Send for ContactEvidence
impl Sync for ContactEvidence
impl Unpin for ContactEvidence
impl UnsafeUnpin for ContactEvidence
impl UnwindSafe for ContactEvidence
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