Enum geometry::contains::Containment
source · pub enum Containment {
None,
Partial,
Full,
}
Expand description
Ways in which an inner shape can be contained within an enclosing shape.
Variants§
None
The enclosing shape does not contain any part of the inner shape.
Partial
The shape is partially contained in the enclosing shape.
Full
The shape is fully contained in the enclosing shape.
Implementations§
source§impl Containment
impl Containment
sourcepub fn intersects(&self) -> bool
pub fn intersects(&self) -> bool
Returns true if there is at least partial containment.
sourcepub fn only_partially_intersects(&self) -> bool
pub fn only_partially_intersects(&self) -> bool
Returns true if there is only partial containment.
Trait Implementations§
source§impl Clone for Containment
impl Clone for Containment
source§fn clone(&self) -> Containment
fn clone(&self) -> Containment
Returns a copy of the value. Read more
1.0.0 · 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 Containment
impl Debug for Containment
source§impl Default for Containment
impl Default for Containment
source§fn default() -> Containment
fn default() -> Containment
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for Containment
impl<'de> Deserialize<'de> for Containment
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for Containment
impl Hash for Containment
source§impl Ord for Containment
impl Ord for Containment
source§fn cmp(&self, other: &Containment) -> Ordering
fn cmp(&self, other: &Containment) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for Containment
impl PartialEq for Containment
source§fn eq(&self, other: &Containment) -> bool
fn eq(&self, other: &Containment) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for Containment
impl PartialOrd for Containment
source§fn partial_cmp(&self, other: &Containment) -> Option<Ordering>
fn partial_cmp(&self, other: &Containment) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for Containment
impl Serialize for Containment
impl Copy for Containment
impl Eq for Containment
impl StructuralPartialEq for Containment
Auto Trait Implementations§
impl RefUnwindSafe for Containment
impl Send for Containment
impl Sync for Containment
impl Unpin for Containment
impl UnwindSafe for Containment
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