pub enum Either<Left, Right> {
Left(Left),
Right(Right),
}Variants§
Trait Implementations§
impl<Left: Copy, Right: Copy> Copy for Either<Left, Right>
impl<Left: Eq, Right: Eq> Eq for Either<Left, Right>
Source§impl<Left, Right, M: NodeMetadata> NodeWithMetadata<M> for Either<Left, Right>where
Left: NodeWithMetadata<M>,
Right: NodeWithMetadata<M>,
impl<Left, Right, M: NodeMetadata> NodeWithMetadata<M> for Either<Left, Right>where
Left: NodeWithMetadata<M>,
Right: NodeWithMetadata<M>,
Source§fn metadata(&self) -> M
fn metadata(&self) -> M
Returns the complete aggregated metadata for this node (self + children).
Default implementation merges children’s metadata with self_metadata().
Source§fn self_metadata(&self) -> M
fn self_metadata(&self) -> M
Returns the metadata contributed by this node itself, not including children.
Most nodes don’t contribute metadata, so can simply return
M::default().
Nodes like StyleRule or AtRules should return their own node kind flags here.Source§impl<Left: Ord, Right: Ord> Ord for Either<Left, Right>
impl<Left: Ord, Right: Ord> Ord for Either<Left, Right>
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
Source§impl<Left: PartialOrd, Right: PartialOrd> PartialOrd for Either<Left, Right>
impl<Left: PartialOrd, Right: PartialOrd> PartialOrd for Either<Left, Right>
Source§impl<Left: SemanticEq, Right: SemanticEq> SemanticEq for Either<Left, Right>
impl<Left: SemanticEq, Right: SemanticEq> SemanticEq for Either<Left, Right>
Source§fn semantic_eq(&self, other: &Self) -> bool
fn semantic_eq(&self, other: &Self) -> bool
Returns
true if self and other are semantically equal.impl<Left: PartialEq, Right: PartialEq> StructuralPartialEq for Either<Left, Right>
Source§impl<Left: ToCursors, Right: ToCursors> ToCursors for Either<Left, Right>
impl<Left: ToCursors, Right: ToCursors> ToCursors for Either<Left, Right>
fn to_cursors(&self, s: &mut impl CursorSink)
Source§impl<Left, Right> ToNumberValue for Either<Left, Right>where
Left: ToNumberValue,
Right: ToNumberValue,
impl<Left, Right> ToNumberValue for Either<Left, Right>where
Left: ToNumberValue,
Right: ToNumberValue,
fn to_number_value(&self) -> Option<f32>
fn to_int_value(&self) -> Option<i32>
Auto Trait Implementations§
impl<Left, Right> Freeze for Either<Left, Right>
impl<Left, Right> RefUnwindSafe for Either<Left, Right>where
Left: RefUnwindSafe,
Right: RefUnwindSafe,
impl<Left, Right> Send for Either<Left, Right>
impl<Left, Right> Sync for Either<Left, Right>
impl<Left, Right> Unpin for Either<Left, Right>
impl<Left, Right> UnsafeUnpin for Either<Left, Right>where
Left: UnsafeUnpin,
Right: UnsafeUnpin,
impl<Left, Right> UnwindSafe for Either<Left, Right>where
Left: UnwindSafe,
Right: UnwindSafe,
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