pub enum StyleAttributeValue {
String(String),
Enum(String),
Unit(Unit),
Color(Color),
}
Expand description
A Style
attribute value.
Variants§
String(String)
A string value, eg. "hello"
.
Enum(String)
An enum value, eg. red
or space-between
.
Unit(Unit)
A length value, eg. 10px
or 10pt
.
Color(Color)
A color value, eg. #ff0000
.
Implementations§
Trait Implementations§
Source§impl Clone for StyleAttributeValue
impl Clone for StyleAttributeValue
Source§fn clone(&self) -> StyleAttributeValue
fn clone(&self) -> StyleAttributeValue
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for StyleAttributeValue
impl Debug for StyleAttributeValue
Source§impl Display for StyleAttributeValue
impl Display for StyleAttributeValue
Source§impl<T> From<&ReadSignal<T>> for StyleAttributeValue
impl<T> From<&ReadSignal<T>> for StyleAttributeValue
Source§fn from(value: &ReadSignal<T>) -> Self
fn from(value: &ReadSignal<T>) -> Self
Converts to this type from the input type.
Source§impl From<&str> for StyleAttributeValue
impl From<&str> for StyleAttributeValue
Source§impl From<Color> for StyleAttributeValue
impl From<Color> for StyleAttributeValue
Source§impl From<String> for StyleAttributeValue
impl From<String> for StyleAttributeValue
Source§impl<T: StyleAttributeEnum> From<T> for StyleAttributeValue
impl<T: StyleAttributeEnum> From<T> for StyleAttributeValue
Source§impl From<Unit> for StyleAttributeValue
impl From<Unit> for StyleAttributeValue
Source§impl From<f32> for StyleAttributeValue
impl From<f32> for StyleAttributeValue
Source§impl From<f64> for StyleAttributeValue
impl From<f64> for StyleAttributeValue
Source§impl From<i128> for StyleAttributeValue
impl From<i128> for StyleAttributeValue
Source§impl From<i16> for StyleAttributeValue
impl From<i16> for StyleAttributeValue
Source§impl From<i32> for StyleAttributeValue
impl From<i32> for StyleAttributeValue
Source§impl From<i64> for StyleAttributeValue
impl From<i64> for StyleAttributeValue
Source§impl From<i8> for StyleAttributeValue
impl From<i8> for StyleAttributeValue
Source§impl From<isize> for StyleAttributeValue
impl From<isize> for StyleAttributeValue
Source§impl From<u128> for StyleAttributeValue
impl From<u128> for StyleAttributeValue
Source§impl From<u16> for StyleAttributeValue
impl From<u16> for StyleAttributeValue
Source§impl From<u32> for StyleAttributeValue
impl From<u32> for StyleAttributeValue
Source§impl From<u64> for StyleAttributeValue
impl From<u64> for StyleAttributeValue
Source§impl From<u8> for StyleAttributeValue
impl From<u8> for StyleAttributeValue
Auto Trait Implementations§
impl Freeze for StyleAttributeValue
impl RefUnwindSafe for StyleAttributeValue
impl Send for StyleAttributeValue
impl Sync for StyleAttributeValue
impl Unpin for StyleAttributeValue
impl UnwindSafe for StyleAttributeValue
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> StyleAttributeBuilder for Twhere
T: Into<StyleAttributeValue>,
impl<T> StyleAttributeBuilder for Twhere
T: Into<StyleAttributeValue>,
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.