pub enum CssDeclaration {
Static(CssProperty),
Dynamic(DynamicCssProperty),
}
Expand description
Contains one parsed key: value
pair, static or dynamic
Variants§
Static(CssProperty)
Static key-value pair, such as width: 500px
Dynamic(DynamicCssProperty)
Dynamic key-value pair with default value, such as width: [[ my_id | 500px ]]
Implementations§
Source§impl CssDeclaration
impl CssDeclaration
pub const fn new_static(prop: CssProperty) -> Self
pub const fn new_dynamic(prop: DynamicCssProperty) -> Self
Sourcepub fn get_type(&self) -> CssPropertyType
pub fn get_type(&self) -> CssPropertyType
Returns the type of the property (i.e. the CSS key as a typed enum)
Sourcepub fn is_inheritable(&self) -> bool
pub fn is_inheritable(&self) -> bool
Determines if the property will be inherited (applied to the children) during the recursive application of the style on the DOM tree
Sourcepub fn can_trigger_relayout(&self) -> bool
pub fn can_trigger_relayout(&self) -> bool
Returns whether this rule affects only styling properties or layout properties (that could trigger a re-layout)
pub fn to_str(&self) -> String
Trait Implementations§
Source§impl Clone for CssDeclaration
impl Clone for CssDeclaration
Source§fn clone(&self) -> CssDeclaration
fn clone(&self) -> CssDeclaration
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 CssDeclaration
impl Debug for CssDeclaration
Source§impl Hash for CssDeclaration
impl Hash for CssDeclaration
Source§impl Ord for CssDeclaration
impl Ord for CssDeclaration
Source§fn cmp(&self, other: &CssDeclaration) -> Ordering
fn cmp(&self, other: &CssDeclaration) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CssDeclaration
impl PartialEq for CssDeclaration
Source§impl PartialOrd for CssDeclaration
impl PartialOrd for CssDeclaration
impl Eq for CssDeclaration
impl StructuralPartialEq for CssDeclaration
Auto Trait Implementations§
impl Freeze for CssDeclaration
impl RefUnwindSafe for CssDeclaration
impl Send for CssDeclaration
impl Sync for CssDeclaration
impl Unpin for CssDeclaration
impl UnwindSafe for CssDeclaration
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)