pub struct UnionShape { /* private fields */ }Expand description
The normalized alternatives contained by ShapeRef::Union.
A union always contains at least two distinct alternatives in canonical order. Use
ShapeRef::union or ShapeRef::try_union to construct one. Alternatives may overlap; a
union means that any alternative is possible, not that exactly one alternative must match.
Implementations§
Source§impl UnionShape
impl UnionShape
Sourcepub fn alternatives(&self) -> &[ShapeRef]
pub fn alternatives(&self) -> &[ShapeRef]
Returns the canonical union alternatives.
Trait Implementations§
Source§impl Clone for UnionShape
impl Clone for UnionShape
Source§fn clone(&self) -> UnionShape
fn clone(&self) -> UnionShape
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 UnionShape
impl Debug for UnionShape
impl Eq for UnionShape
Source§impl Ord for UnionShape
impl Ord for UnionShape
Source§fn cmp(&self, other: &UnionShape) -> Ordering
fn cmp(&self, other: &UnionShape) -> Ordering
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for UnionShape
impl PartialEq for UnionShape
Source§impl PartialOrd for UnionShape
impl PartialOrd for UnionShape
impl StructuralPartialEq for UnionShape
Auto Trait Implementations§
impl Freeze for UnionShape
impl RefUnwindSafe for UnionShape
impl Send for UnionShape
impl Sync for UnionShape
impl Unpin for UnionShape
impl UnsafeUnpin for UnionShape
impl UnwindSafe for UnionShape
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