Struct parcel_css::media_query::MediaQuery [−][src]
pub struct MediaQuery {
pub qualifier: Option<Qualifier>,
pub media_type: MediaType,
pub condition: Option<MediaCondition>,
}
Expand description
https://drafts.csswg.org/mediaqueries/
Fields
qualifier: Option<Qualifier>
The qualifier for this query.
media_type: MediaType
The media type for this query, that can be known, unknown, or “all”.
condition: Option<MediaCondition>
The condition that this media query contains. This cannot have or
in the first level.
Implementations
pub fn parse<'i, 't>(
input: &mut Parser<'i, 't>
) -> Result<Self, ParseError<'i, ParserError<'i>>>
pub fn parse<'i, 't>(
input: &mut Parser<'i, 't>
) -> Result<Self, ParseError<'i, ParserError<'i>>>
Parse a media query given css input.
Returns an error if any of the expressions is unknown.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for MediaQuery
impl Send for MediaQuery
impl Sync for MediaQuery
impl Unpin for MediaQuery
impl UnwindSafe for MediaQuery
Blanket Implementations
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Mutably borrows from an owned value. Read more