pub struct Declaration {
pub name: String,
pub value: Vec<ComponentValue>,
pub important: bool,
pub original_text: Option<String>,
}Expand description
§5.2 L1663-1669: A declaration has a name, a value (list of
component values), an important flag, and an optional
original_text.
Fields§
§name: StringThe property or descriptor name (e.g. “color”, “font-family”).
value: Vec<ComponentValue>The value: component values between : and ; (or end of
block).
important: boolWhether the declaration had an !important flag.
original_text: Option<String>§5.2 L1668-1669 + §5.5.6 L2693-2698: only set for custom
property declarations (--foo: ...), to allow var()
resolution to access the original source text.
Trait Implementations§
Source§impl Clone for Declaration
impl Clone for Declaration
Source§fn clone(&self) -> Declaration
fn clone(&self) -> Declaration
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Declaration
impl RefUnwindSafe for Declaration
impl Send for Declaration
impl Sync for Declaration
impl Unpin for Declaration
impl UnsafeUnpin for Declaration
impl UnwindSafe for Declaration
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