Trait rsvg::property_macros::Property
source · pub trait Property {
// Required methods
fn inherits_automatically() -> bool;
fn compute(&self, _: &ComputedValues) -> Self;
}
Expand description
Trait which all CSS property types should implement.
Required Methods§
sourcefn inherits_automatically() -> bool
fn inherits_automatically() -> bool
Whether the property’s computed value inherits from parent to child elements.
For each property, the CSS or SVG specs say whether the property inherits
automatically. When a property is not specified in an element, the return value
of this method determines whether the property’s value is copied from the parent
element (true
), or whether it resets to the initial/default value (false
).
sourcefn compute(&self, _: &ComputedValues) -> Self
fn compute(&self, _: &ComputedValues) -> Self
Derive the CSS computed value from the parent element’s
ComputedValues
and the
self
value.
The CSS or SVG specs say how to derive this for each property.
Object Safety§
This trait is not object safe.