#[repr(u8)]pub enum NamedFeature {
AnchorPositionFollowsTransforms = 0,
SingleAxisScrollContainer = 1,
}Expand description
List of named features.
https://drafts.csswg.org/css-conditional-5/#support-definition-named-features
Variants§
AnchorPositionFollowsTransforms = 0
Anchoring to a transformed element takes the anchor’s transforms into account.
SingleAxisScrollContainer = 1
A scroll container that scrolls in one axis and clips in the other.
Implementations§
Source§impl NamedFeature
impl NamedFeature
Sourcepub fn parse(input: &mut Parser<'_>) -> Result<Self, ParseError>
pub fn parse(input: &mut Parser<'_>) -> Result<Self, ParseError>
Parse this keyword.
Sourcepub fn from_ident(ident: &str) -> Result<Self, ()>
pub fn from_ident(ident: &str) -> Result<Self, ()>
Parse this keyword from a string slice.
Source§impl NamedFeature
impl NamedFeature
Sourcepub fn eval(self) -> bool
pub fn eval(self) -> bool
Determine if a named feature is supported.
https://drafts.csswg.org/css-conditional-5/#typedef-supports-named-feature-fn
Trait Implementations§
Source§impl Clone for NamedFeature
impl Clone for NamedFeature
Source§fn clone(&self) -> NamedFeature
fn clone(&self) -> NamedFeature
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 NamedFeature
impl Debug for NamedFeature
Source§impl Parse for NamedFeature
impl Parse for NamedFeature
Source§fn parse(
_: &ParserContext<'_>,
input: &mut Parser<'_>,
) -> Result<Self, ParseError>
fn parse( _: &ParserContext<'_>, input: &mut Parser<'_>, ) -> Result<Self, ParseError>
Parse a value of this type. Read more
Source§impl ToCss for NamedFeature
impl ToCss for NamedFeature
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 NamedFeature
impl ToShmem for NamedFeature
impl Copy for NamedFeature
Auto Trait Implementations§
impl Freeze for NamedFeature
impl RefUnwindSafe for NamedFeature
impl Send for NamedFeature
impl Sync for NamedFeature
impl Unpin for NamedFeature
impl UnsafeUnpin for NamedFeature
impl UnwindSafe for NamedFeature
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