Struct ori_core::StyleAttribute
source · pub struct StyleAttribute {
pub key: StyleAttributeKey,
pub value: StyleAttributeValue,
pub transition: Option<StyleTransition>,
}
Expand description
A Style
attribute.
An attribute is a name and a value.
Fields§
§key: StyleAttributeKey
The attribute key.
value: StyleAttributeValue
The attribute value.
transition: Option<StyleTransition>
The transition to use when animating the attribute.
Implementations§
source§impl StyleAttribute
impl StyleAttribute
pub fn new( key: impl Into<SmolStr>, value: impl Into<StyleAttributeValue> ) -> Self
pub fn with_transition( key: impl Into<SmolStr>, value: impl Into<StyleAttributeValue>, transition: impl Into<StyleTransition> ) -> Self
Trait Implementations§
source§impl Clone for StyleAttribute
impl Clone for StyleAttribute
source§fn clone(&self) -> StyleAttribute
fn clone(&self) -> StyleAttribute
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for StyleAttribute
impl Debug for StyleAttribute
source§impl FromIterator<StyleAttribute> for StyleAttributes
impl FromIterator<StyleAttribute> for StyleAttributes
source§fn from_iter<T: IntoIterator<Item = StyleAttribute>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = StyleAttribute>>(iter: T) -> Self
Creates a value from an iterator. Read more
Auto Trait Implementations§
impl RefUnwindSafe for StyleAttribute
impl Send for StyleAttribute
impl Sync for StyleAttribute
impl Unpin for StyleAttribute
impl UnwindSafe for StyleAttribute
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> Styleable<T> for T
impl<T> Styleable<T> for T
source§fn styled(self) -> Styled<T>
fn styled(self) -> Styled<T>
Converts the
self
into a Styled<Self>
value.source§fn 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.