pub enum Value {
Point(Point),
Size(Size),
Rect(Rect),
Insets(Insets),
Color(Color),
Float(f64),
Bool(bool),
UnsignedInt(u64),
String(Arc<str>),
Font(FontDescriptor),
RoundedRectRadii(RoundedRectRadii),
Other(Arc<dyn Any + Send + Sync + 'static>),
}
Expand description
A dynamic type representing all values that can be stored in an environment.
Variants§
Point(Point)
Size(Size)
Rect(Rect)
Insets(Insets)
Color(Color)
Float(f64)
Bool(bool)
UnsignedInt(u64)
String(Arc<str>)
Font(FontDescriptor)
RoundedRectRadii(RoundedRectRadii)
Other(Arc<dyn Any + Send + Sync + 'static>)
Implementations§
§impl Value
impl Value
pub fn to_inner_unchecked<V>(&self) -> Vwhere
V: ValueType,
pub fn to_inner_unchecked<V>(&self) -> Vwhere V: ValueType,
Get a reference to the inner object.
Panics
Panics when the value variant doesn’t match the provided type.
Trait Implementations§
§impl From<FontDescriptor> for Value
impl From<FontDescriptor> for Value
§fn from(val: FontDescriptor) -> Value
fn from(val: FontDescriptor) -> Value
Converts to this type from the input type.
§impl From<RoundedRectRadii> for Value
impl From<RoundedRectRadii> for Value
§fn from(val: RoundedRectRadii) -> Value
fn from(val: RoundedRectRadii) -> Value
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl !UnwindSafe for Value
Blanket Implementations§
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
§fn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.