pub enum IfTest<'a> {
SupportsDeclaration(Function, Box<'a, Declaration<'a, StyleValue<'a>, CssMetadata>>, RightParen),
Supports(Function, SupportsCondition<'a>, RightParen),
Media(Function, MediaCondition<'a>, RightParen),
Style(Function, StyleQuery<'a>, RightParen),
Group(LeftParen, Box<'a, IfConditionExpr<'a>>, RightParen),
GeneralEnclosed(Function, ComponentValues<'a>, RightParen),
}Expand description
A single <if-test> inside an IfCondition boolean expression.
https://drafts.csswg.org/css-values-5/#typedef-if-test
<if-test> =
supports( [ <ident> : <declaration-value> ] | <supports-condition> ) |
media( <media-feature> | <media-condition> ) |
style( <style-query> )Variants§
SupportsDeclaration(Function, Box<'a, Declaration<'a, StyleValue<'a>, CssMetadata>>, RightParen)
supports( <ident> : <declaration-value> )
Supports(Function, SupportsCondition<'a>, RightParen)
supports( <supports-condition> )
Media(Function, MediaCondition<'a>, RightParen)
media( <media-feature> | <media-condition> )
Style(Function, StyleQuery<'a>, RightParen)
style( <style-query> )
Group(LeftParen, Box<'a, IfConditionExpr<'a>>, RightParen)
( <boolean-expr[ <if-test> ]> )
GeneralEnclosed(Function, ComponentValues<'a>, RightParen)
<general-enclosed>: forward-compatible unknown, preserved verbatim.
Trait Implementations§
impl<'a> Eq for IfTest<'a>
Source§impl<'a> NodeWithMetadata<CssMetadata> for IfTest<'a>
impl<'a> NodeWithMetadata<CssMetadata> for IfTest<'a>
Source§fn self_metadata(&self) -> CssMetadata
fn self_metadata(&self) -> CssMetadata
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§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§impl<'a> Ord for IfTest<'a>
impl<'a> Ord for IfTest<'a>
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<'a> PartialOrd for IfTest<'a>
impl<'a> PartialOrd for IfTest<'a>
Source§impl<'a> SemanticEq for IfTest<'a>
impl<'a> SemanticEq for IfTest<'a>
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<'a> StructuralPartialEq for IfTest<'a>
Source§impl<'a> ToCursors for IfTest<'a>
impl<'a> ToCursors for IfTest<'a>
fn to_cursors(&self, s: &mut impl CursorSink)
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for IfTest<'a>
impl<'a> !Send for IfTest<'a>
impl<'a> !Sync for IfTest<'a>
impl<'a> !UnwindSafe for IfTest<'a>
impl<'a> Freeze for IfTest<'a>
impl<'a> Unpin for IfTest<'a>
impl<'a> UnsafeUnpin for IfTest<'a>
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