pub enum AutoOr<T> {
Auto(Ident),
Some(T),
}Variants§
Trait Implementations§
impl<T: Copy> Copy for AutoOr<T>
impl<T: Eq> Eq for AutoOr<T>
Source§impl<T: NodeWithMetadata<CssMetadata>> NodeWithMetadata<CssMetadata> for AutoOr<T>
impl<T: NodeWithMetadata<CssMetadata>> NodeWithMetadata<CssMetadata> for AutoOr<T>
Source§fn metadata(&self) -> CssMetadata
fn metadata(&self) -> CssMetadata
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<T: Ord> Ord for AutoOr<T>
impl<T: Ord> Ord for AutoOr<T>
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<T: PartialOrd> PartialOrd for AutoOr<T>
impl<T: PartialOrd> PartialOrd for AutoOr<T>
Source§impl<T> SemanticEq for AutoOr<T>where
T: SemanticEq,
impl<T> SemanticEq for AutoOr<T>where
T: SemanticEq,
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<T: PartialEq> StructuralPartialEq for AutoOr<T>
Source§impl<T> ToCursors for AutoOr<T>where
T: ToCursors,
impl<T> ToCursors for AutoOr<T>where
T: ToCursors,
fn to_cursors(&self, s: &mut impl CursorSink)
Source§impl<T: ToNumberValue> ToNumberValue for AutoOr<T>
impl<T: ToNumberValue> ToNumberValue for AutoOr<T>
fn to_number_value(&self) -> Option<f32>
fn to_int_value(&self) -> Option<i32>
Auto Trait Implementations§
impl<T> Freeze for AutoOr<T>where
T: Freeze,
impl<T> RefUnwindSafe for AutoOr<T>where
T: RefUnwindSafe,
impl<T> Send for AutoOr<T>where
T: Send,
impl<T> Sync for AutoOr<T>where
T: Sync,
impl<T> Unpin for AutoOr<T>where
T: Unpin,
impl<T> UnsafeUnpin for AutoOr<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for AutoOr<T>where
T: 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