#[repr(C)]pub struct CssRuleBlock {
pub path: CssPath,
pub declarations: CssDeclarationVec,
pub conditions: DynamicSelectorVec,
}Expand description
One block of rules that applies a bunch of rules to a “path” in the style, i.e.
div#myid.myclass -> { ("justify-content", "center") }
The conditions field contains @media/@lang/etc. conditions that must ALL be
satisfied for this rule block to apply (from enclosing @-rule blocks).
Fields§
§path: CssPathThe css path (full selector) of the style ruleset
declarations: CssDeclarationVec"justify-content: center" =>
CssDeclaration::Static(CssProperty::JustifyContent(LayoutJustifyContent::Center))
conditions: DynamicSelectorVecConditions from enclosing @-rules (@media, @lang, etc.) that must ALL be satisfied for this rule block to apply. Empty = unconditional.
Implementations§
Source§impl CssRuleBlock
impl CssRuleBlock
pub fn new(path: CssPath, declarations: Vec<CssDeclaration>) -> Self
pub fn with_conditions( path: CssPath, declarations: Vec<CssDeclaration>, conditions: Vec<DynamicSelector>, ) -> Self
Trait Implementations§
Source§impl Clone for CssRuleBlock
impl Clone for CssRuleBlock
Source§fn clone(&self) -> CssRuleBlock
fn clone(&self) -> CssRuleBlock
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 CssRuleBlock
impl Debug for CssRuleBlock
Source§impl Extend<CssRuleBlock> for CssRuleBlockVec
impl Extend<CssRuleBlock> for CssRuleBlockVec
Source§fn extend<T: IntoIterator<Item = CssRuleBlock>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = CssRuleBlock>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl FromIterator<CssRuleBlock> for CssRuleBlockVec
impl FromIterator<CssRuleBlock> for CssRuleBlockVec
Source§fn from_iter<T>(iter: T) -> Selfwhere
T: IntoIterator<Item = CssRuleBlock>,
fn from_iter<T>(iter: T) -> Selfwhere
T: IntoIterator<Item = CssRuleBlock>,
Creates a value from an iterator. Read more
Source§impl PartialEq for CssRuleBlock
impl PartialEq for CssRuleBlock
Source§impl PartialOrd for CssRuleBlock
impl PartialOrd for CssRuleBlock
impl StructuralPartialEq for CssRuleBlock
Auto Trait Implementations§
impl Freeze for CssRuleBlock
impl RefUnwindSafe for CssRuleBlock
impl Send for CssRuleBlock
impl Sync for CssRuleBlock
impl Unpin for CssRuleBlock
impl UnwindSafe for CssRuleBlock
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