Struct style::custom_properties::CustomPropertiesBuilder
[−]
[src]
pub struct CustomPropertiesBuilder<'a> { /* fields omitted */ }
A struct that takes care of encapsulating the cascade process for custom properties.
Methods
impl<'a> CustomPropertiesBuilder<'a>
[src]
pub fn new(inherited: Option<&'a Arc<CustomPropertiesMap>>) -> Self
[src]
Create a new builder, inheriting from a given custom properties map.
pub fn cascade(
&mut self,
name: &'a Name,
specified_value: DeclaredValue<'a, Arc<SpecifiedValue>>
)
[src]
&mut self,
name: &'a Name,
specified_value: DeclaredValue<'a, Arc<SpecifiedValue>>
)
Cascade a given custom property declaration.
pub fn build(self) -> Option<Arc<CustomPropertiesMap>>
[src]
Returns the final map of applicable custom properties.
If there was any specified property, we've created a new map and now we need to remove any potential cycles, and wrap it in an arc.
Otherwise, just use the inherited custom properties map.