pub struct CssMediaBuilder { /* private fields */ }Available on crate features
experimental and CSS and DOM and Page only.Implementations§
Source§impl CssMediaBuilder
impl CssMediaBuilder
Sourcepub fn source(&mut self, v: CssMediaSource) -> &mut Self
pub fn source(&mut self, v: CssMediaSource) -> &mut Self
Source of the media query: “mediaRule” if specified by a @media rule, “importRule” if specified by an @import rule, “linkedSheet” if specified by a “media” attribute in a linked stylesheet’s LINK tag, “inlineSheet” if specified by a “media” attribute in an inline stylesheet’s STYLE tag.
Sourcepub fn source_url(&mut self, v: String) -> &mut Self
pub fn source_url(&mut self, v: String) -> &mut Self
URL of the document containing the media query description.
Sourcepub fn range(&mut self, v: SourceRange) -> &mut Self
pub fn range(&mut self, v: SourceRange) -> &mut Self
The associated rule (@media or @import) header range in the enclosing stylesheet (if available).
Sourcepub fn style_sheet_id(&mut self, v: StyleSheetId) -> &mut Self
pub fn style_sheet_id(&mut self, v: StyleSheetId) -> &mut Self
Identifier of the stylesheet containing this object (if exists).
Sourcepub fn media_list(&mut self, v: Vec<MediaQuery>) -> &mut Self
pub fn media_list(&mut self, v: Vec<MediaQuery>) -> &mut Self
Array of media queries.
pub fn build(&mut self) -> Result<CssMedia, &'static str>
Trait Implementations§
Source§impl Clone for CssMediaBuilder
impl Clone for CssMediaBuilder
Source§fn clone(&self) -> CssMediaBuilder
fn clone(&self) -> CssMediaBuilder
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 CssMediaBuilder
impl Debug for CssMediaBuilder
Auto Trait Implementations§
impl Freeze for CssMediaBuilder
impl RefUnwindSafe for CssMediaBuilder
impl Send for CssMediaBuilder
impl Sync for CssMediaBuilder
impl Unpin for CssMediaBuilder
impl UnwindSafe for CssMediaBuilder
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