pub struct MediaRule { /* private fields */ }Expand description
Represents a CSS @media rule attached to a class.
Each media rule has a query string (e.g., “(max-width: 767px)”)
and a style declaration string. When injected into the DOM, it produces
a rule like @media (max-width: 767px) { .class-name { font-size: 14px; } }.
Implementations§
Source§impl MediaRule
impl MediaRule
pub fn get_query(&self) -> &String
pub fn set_query(&mut self, val: String) -> &mut Self
pub fn get_mut_query(&mut self) -> &mut String
pub fn get_style(&self) -> &String
pub fn set_style(&mut self, val: String) -> &mut Self
pub fn get_mut_style(&mut self) -> &mut String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MediaRule
impl RefUnwindSafe for MediaRule
impl Send for MediaRule
impl Sync for MediaRule
impl Unpin for MediaRule
impl UnsafeUnpin for MediaRule
impl UnwindSafe for MediaRule
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