pub struct OutputRelation {
pub contains: Option<bool>,
pub strict_contains: Option<bool>,
pub contained: Option<bool>,
pub strict_contained: Option<bool>,
pub intersect: Option<bool>,
pub disjoint: Option<bool>,
}Expand description
Returned by the relation function.
All fields are made of a Option<bool>.
There are two cases for which a field can be None:
- If you didn’t ask for it when filling the
InputRelationstruct - If the relation algorithm didn’t evaluate this relation because the
early_exitflag was set.
Note that when early exit is set, most fields will be set to Some(false) even
though they were not evaluated at all.
Fields§
§contains: Option<bool>Return true if any part on the first shape contains any part of the second shape.
strict_contains: Option<bool>Return true if any parts of the first shape contains all parts of the second shape.
contained: Option<bool>Return true if any part of the first shape is contained in any part of the second shape.
strict_contained: Option<bool>Return true if all parts of the first shape are contained in any part of the second shape.
intersect: Option<bool>Return true if all parts of the first shape are contained in any part of the second shape.
disjoint: Option<bool>Return true if there is no relation between both shapes.
Implementations§
Source§impl OutputRelation
impl OutputRelation
Sourcepub fn any_relation(&self) -> bool
pub fn any_relation(&self) -> bool
Return true if the output contains anything except disjoint.
Sourcepub fn swap_contains_relation(self) -> Self
pub fn swap_contains_relation(self) -> Self
Swap the contains and contained relation.
Trait Implementations§
Source§impl BitOr for OutputRelation
impl BitOr for OutputRelation
Source§impl BitOrAssign for OutputRelation
impl BitOrAssign for OutputRelation
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|= operation. Read moreSource§impl Clone for OutputRelation
impl Clone for OutputRelation
Source§fn clone(&self) -> OutputRelation
fn clone(&self) -> OutputRelation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OutputRelation
impl Debug for OutputRelation
Source§impl Default for OutputRelation
impl Default for OutputRelation
Source§fn default() -> OutputRelation
fn default() -> OutputRelation
Source§impl PartialEq for OutputRelation
impl PartialEq for OutputRelation
impl Copy for OutputRelation
impl Eq for OutputRelation
impl StructuralPartialEq for OutputRelation
Auto Trait Implementations§
impl Freeze for OutputRelation
impl RefUnwindSafe for OutputRelation
impl Send for OutputRelation
impl Sync for OutputRelation
impl Unpin for OutputRelation
impl UnwindSafe for OutputRelation
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more