pub enum SupportsCondition {
    Not(Box<SupportsCondition>),
    Parenthesized(Box<SupportsCondition>),
    And(Vec<SupportsCondition>),
    Or(Vec<SupportsCondition>),
    Declaration(Declaration),
    Selector(RawSelector),
    FontFormat(FontFaceSourceFormatKeyword),
    FontTech(FontFaceSourceTechFlags),
    FutureSyntax(String),
}Expand description
An @supports condition
Variants§
Not(Box<SupportsCondition>)
not (condition)
Parenthesized(Box<SupportsCondition>)
(condition)
And(Vec<SupportsCondition>)
(condition) and (condition) and (condition) ..
Or(Vec<SupportsCondition>)
(condition) or (condition) or (condition) ..
Declaration(Declaration)
property-ident: value (value can be any tokens)
Selector(RawSelector)
A selector() function.
FontFormat(FontFaceSourceFormatKeyword)
font-format(<font-format>)
FontTech(FontFaceSourceTechFlags)
font-tech(<font-tech>)
FutureSyntax(String)
(any tokens) or func(any tokens)
Implementations§
Source§impl SupportsCondition
 
impl SupportsCondition
Sourcepub fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>>
 
pub fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>>
Parse a condition
https://drafts.csswg.org/css-conditional/#supports_condition
Sourcefn parse_functional<'i, 't>(
    function: &str,
    input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>>
 
fn parse_functional<'i, 't>( function: &str, input: &mut Parser<'i, 't>, ) -> Result<Self, ParseError<'i>>
Parses a functional supports condition.
Sourcepub fn parse_for_import<'i, 't>(
    input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>>
 
pub fn parse_for_import<'i, 't>( input: &mut Parser<'i, 't>, ) -> Result<Self, ParseError<'i>>
Parses an @import condition as per
https://drafts.csswg.org/css-cascade-5/#typedef-import-conditions
Sourcefn parse_in_parens<'i, 't>(
    input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>>
 
fn parse_in_parens<'i, 't>( input: &mut Parser<'i, 't>, ) -> Result<Self, ParseError<'i>>
Sourcepub fn eval(&self, cx: &ParserContext<'_>) -> bool
 
pub fn eval(&self, cx: &ParserContext<'_>) -> bool
Evaluate a supports condition
Trait Implementations§
Source§impl Clone for SupportsCondition
 
impl Clone for SupportsCondition
Source§fn clone(&self) -> SupportsCondition
 
fn clone(&self) -> SupportsCondition
Returns a duplicate 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 SupportsCondition
 
impl Debug for SupportsCondition
Source§impl ToCss for SupportsCondition
 
impl ToCss for SupportsCondition
Source§fn to_css<W>(&self, dest: &mut CssWriter<'_, W>) -> Resultwhere
    W: Write,
 
fn to_css<W>(&self, dest: &mut CssWriter<'_, W>) -> Resultwhere
    W: Write,
Serialize 
self in CSS syntax, writing to dest.Source§fn to_css_string(&self) -> String
 
fn to_css_string(&self) -> String
Serialize 
self in CSS syntax and return a string. Read moreSource§fn to_css_cssstring(&self) -> String
 
fn to_css_cssstring(&self) -> String
Serialize 
self in CSS syntax and return a CssString. Read moreSource§impl ToShmem for SupportsCondition
 
impl ToShmem for SupportsCondition
Auto Trait Implementations§
impl Freeze for SupportsCondition
impl RefUnwindSafe for SupportsCondition
impl Send for SupportsCondition
impl Sync for SupportsCondition
impl Unpin for SupportsCondition
impl UnwindSafe for SupportsCondition
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
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
 
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
 
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
 
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
 
fn maybe_boxed(self) -> T
Convert