pub trait Styleable<T> {
// Required methods
fn styled(self) -> Styled<T>;
fn class(self, class: impl AsRef<str>) -> Styled<T>;
fn attr(self, key: &str, builder: impl StyleAttributeBuilder) -> Styled<T>;
fn attr_trans(
self,
key: &str,
value: impl Into<StyleAttributeValue>,
transition: impl Into<StyleTransition>
) -> Styled<T>;
}
Expand description
A trait for adding style attributes to a value.
Required Methods§
sourcefn styled(self) -> Styled<T>
fn styled(self) -> Styled<T>
Converts the self
into a Styled<Self>
value.
sourcefn attr(self, key: &str, builder: impl StyleAttributeBuilder) -> Styled<T>
fn attr(self, key: &str, builder: impl StyleAttributeBuilder) -> Styled<T>
Adds an attribute.
sourcefn attr_trans(
self,
key: &str,
value: impl Into<StyleAttributeValue>,
transition: impl Into<StyleTransition>
) -> Styled<T>
fn attr_trans( self, key: &str, value: impl Into<StyleAttributeValue>, transition: impl Into<StyleTransition> ) -> Styled<T>
Adds an attribute with a transition.