Struct style::stylesheets::document_rule::DocumentCondition
source · pub struct DocumentCondition(Vec<DocumentMatchingFunction>);
Expand description
A @document
rule’s condition.
https://www.w3.org/TR/2012/WD-css3-conditional-20120911/#at-document
The @document
rule’s condition is written as a comma-separated list of
URL matching functions, and the condition evaluates to true whenever any
one of those functions evaluates to true.
Tuple Fields§
§0: Vec<DocumentMatchingFunction>
Implementations§
source§impl DocumentCondition
impl DocumentCondition
sourcepub fn parse<'i, 't>(
context: &ParserContext<'_>,
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>>
pub fn parse<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, ) -> Result<Self, ParseError<'i>>
Parse a document condition.
fn allowed_in(&self, _: &ParserContext<'_>) -> bool
Trait Implementations§
source§impl Clone for DocumentCondition
impl Clone for DocumentCondition
source§fn clone(&self) -> DocumentCondition
fn clone(&self) -> DocumentCondition
Returns a copy 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 DocumentCondition
impl Debug for DocumentCondition
source§impl ToCss for DocumentCondition
impl ToCss for DocumentCondition
source§impl ToShmem for DocumentCondition
impl ToShmem for DocumentCondition
Auto Trait Implementations§
impl Freeze for DocumentCondition
impl RefUnwindSafe for DocumentCondition
impl Send for DocumentCondition
impl Sync for DocumentCondition
impl Unpin for DocumentCondition
impl UnwindSafe for DocumentCondition
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> 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