StylingAttribute

Trait StylingAttribute 

Source
pub trait StylingAttribute<S> {
    type Value: Default;

    // Required methods
    fn set_in(self, composed_styling: S, value: Self::Value) -> S;
    fn get_from(self, composed_styling: &S) -> Self::Value;
}
Expand description

A trait to represent an attribute that can be set in or retrieved from any composed styling value.

Required Associated Types§

Source

type Value: Default

The type of value associated with this attribute.

Required Methods§

Source

fn set_in(self, composed_styling: S, value: Self::Value) -> S

Sets this attribute in the given parameter, returning it updated.

Source

fn get_from(self, composed_styling: &S) -> Self::Value

Gets the value of this attribute from the given parameter.

Implementors§