pub struct ContactRequest { /* private fields */ }Expand description
A request for the contact measurement of one object.
The request names the candidates the face may rest on. Which objects count is the rule’s scope decision, so an adapter measures exactly these and no others: an object outside the list neither supports the face nor blocks the measurement.
Implementations§
Source§impl ContactRequest
impl ContactRequest
Sourcepub fn new(
subject: ObjectId,
candidates: Vec<ObjectId>,
side: ContactSide,
tolerance: ContactTolerance,
) -> Self
pub fn new( subject: ObjectId, candidates: Vec<ObjectId>, side: ContactSide, tolerance: ContactTolerance, ) -> Self
Candidates are sorted and deduplicated, and the subject is removed: a face never rests on itself.
pub fn subject(&self) -> &ObjectId
Sourcepub fn candidates(&self) -> &[ObjectId]
pub fn candidates(&self) -> &[ObjectId]
The objects the face may rest on: sorted, deduplicated, subject excluded.
Sourcepub fn is_candidate(&self, object: &ObjectId) -> bool
pub fn is_candidate(&self, object: &ObjectId) -> bool
Whether object is one of the requested candidates.
pub fn side(&self) -> ContactSide
pub fn tolerance(&self) -> ContactTolerance
Trait Implementations§
Source§impl Clone for ContactRequest
impl Clone for ContactRequest
Source§impl Debug for ContactRequest
impl Debug for ContactRequest
Source§impl PartialEq for ContactRequest
impl PartialEq for ContactRequest
impl StructuralPartialEq for ContactRequest
Auto Trait Implementations§
impl Freeze for ContactRequest
impl RefUnwindSafe for ContactRequest
impl Send for ContactRequest
impl Sync for ContactRequest
impl Unpin for ContactRequest
impl UnsafeUnpin for ContactRequest
impl UnwindSafe for ContactRequest
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