pub trait DeclarationMetadata:
    PartialEq
    + Sized
    + Clone {
Show 14 methods
    // Required method
    fn initial() -> &'static str;
    // Provided methods
    fn inherits() -> Inherits { ... }
    fn applies_to() -> AppliesTo { ... }
    fn percentages() -> Percentages { ... }
    fn animation_type() -> AnimationType { ... }
    fn is_shorthand() -> bool { ... }
    fn is_longhand() -> bool { ... }
    fn shorthand_group() -> CssAtomSet { ... }
    fn property_group() -> PropertyGroup { ... }
    fn computed_value_type() -> ComputedValueType { ... }
    fn canonical_order() -> Option<&'static str> { ... }
    fn logical_property_group() -> Option<CssAtomSet> { ... }
    fn box_side() -> BoxSide { ... }
    fn box_portion() -> BoxPortion { ... }
}Required Methods§
Provided Methods§
Sourcefn applies_to() -> AppliesTo
 
fn applies_to() -> AppliesTo
Determines what types of frames this rule applies to
Sourcefn percentages() -> Percentages
 
fn percentages() -> Percentages
Determines how this style value resolves percentages, if they are allowed as values
Sourcefn animation_type() -> AnimationType
 
fn animation_type() -> AnimationType
Returns how this style value animates
Sourcefn is_shorthand() -> bool
 
fn is_shorthand() -> bool
Determines if this style value is a “shorthand” value, meaning it is comprised of other “longhand” style values.
Sourcefn is_longhand() -> bool
 
fn is_longhand() -> bool
Determines if this style value is a “longhand” value, meaning a “shorthand” style value exists that could also express this.
Sourcefn shorthand_group() -> CssAtomSet
 
fn shorthand_group() -> CssAtomSet
Returns the declaration ID of the shorthand that this property is part of.
If this is not a longhand then it will be CssAtomSet::_None.
Sourcefn property_group() -> PropertyGroup
 
fn property_group() -> PropertyGroup
Returns which CSS specification(s) this property belongs to. This allows tracking which CSS modules are used in a stylesheet.
Sourcefn computed_value_type() -> ComputedValueType
 
fn computed_value_type() -> ComputedValueType
Returns how the computed value is calculated from the specified value.
Sourcefn canonical_order() -> Option<&'static str>
 
fn canonical_order() -> Option<&'static str>
Returns the canonical order for serialization (e.g., “per grammar”, “unique”). Returns None if not specified or not applicable.
Sourcefn logical_property_group() -> Option<CssAtomSet>
 
fn logical_property_group() -> Option<CssAtomSet>
Returns the logical property group this property belongs to (e.g., “Margin”, “Border”). This groups related logical/physical properties together. Returns None if this is not part of a logical property group.
Sourcefn box_side() -> BoxSide
 
fn box_side() -> BoxSide
Returns which side(s) of the box this property applies to.
For example, margin-top returns BoxSide::Top, while margin returns all sides.
Returns BoxSide::none() if the property doesn’t apply to a specific side.
Sourcefn box_portion() -> BoxPortion
 
fn box_portion() -> BoxPortion
Returns which portion(s) of the box model this property affects.
For example, margin-top returns BoxPortion::Margin, border-width returns BoxPortion::Border.
Returns BoxPortion::none() if the property doesn’t affect the box model.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.