pub struct SightEvidence { /* private fields */ }Expand description
The answer to a SightRequest.
Implementations§
Source§impl SightEvidence
impl SightEvidence
Sourcepub fn try_new(
target: ObjectId,
distance: (f64, f64),
outcome: Option<SightOutcome>,
evidence: Evidence,
) -> Result<Self, SightError>
pub fn try_new( target: ObjectId, distance: (f64, f64), outcome: Option<SightOutcome>, evidence: Evidence, ) -> Result<Self, SightError>
The view of target: the distance from the eye to its nearest point,
known to lie in distance (metres, inclusive), and the outcome, which
is None only when the target lies surely beyond the request’s range.
§Errors
SightError::InvalidEvidence for reversed, negative or non-finite
distance bounds, a witness that is not finite, a hidden target with no
occluders, or evidence without a locator.
Sourcepub fn distance_metres(&self) -> (f64, f64)
pub fn distance_metres(&self) -> (f64, f64)
Bounds on the distance from the eye to the target’s nearest point, in metres.
Sourcepub fn outcome(&self) -> Option<&SightOutcome>
pub fn outcome(&self) -> Option<&SightOutcome>
The outcome, or None for a target surely beyond the range.
Trait Implementations§
Source§impl Clone for SightEvidence
impl Clone for SightEvidence
Source§impl Debug for SightEvidence
impl Debug for SightEvidence
Source§impl PartialEq for SightEvidence
impl PartialEq for SightEvidence
impl StructuralPartialEq for SightEvidence
Auto Trait Implementations§
impl Freeze for SightEvidence
impl RefUnwindSafe for SightEvidence
impl Send for SightEvidence
impl Sync for SightEvidence
impl Unpin for SightEvidence
impl UnsafeUnpin for SightEvidence
impl UnwindSafe for SightEvidence
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