Trait ori_core::Styleable

source ·
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§

source

fn styled(self) -> Styled<T>

Converts the self into a Styled<Self> value.

source

fn class(self, class: impl AsRef<str>) -> Styled<T>

Adds a class.

source

fn attr(self, key: &str, builder: impl StyleAttributeBuilder) -> Styled<T>

Adds an attribute.

source

fn attr_trans( self, key: &str, value: impl Into<StyleAttributeValue>, transition: impl Into<StyleTransition> ) -> Styled<T>

Adds an attribute with a transition.

Implementors§

source§

impl<T> Styleable<T> for Styled<T>

source§

impl<T> Styleable<T> for T