#[repr(C, u8)]pub enum ComponentFieldType {
Show 20 variants
String,
Bool,
I32,
I64,
U32,
U64,
Usize,
F32,
F64,
ColorU,
CssProperty,
ImageRef,
FontRef,
StyledDom,
Callback(ComponentCallbackSignature),
RefAny(AzString),
OptionType(ComponentFieldTypeBox),
VecType(ComponentFieldTypeBox),
StructRef(AzString),
EnumRef(AzString),
}Expand description
Rich type descriptor for a component field.
Replaces the old AzString type names (“String”, “bool”, etc.) with
a structured enum that the debugger can use for type-aware editing.
Variants§
String
Bool
I32
I64
U32
U64
Usize
F32
F64
ColorU
CssProperty
ImageRef
FontRef
StyledDom
StyledDom slot — field name = slot name
Callback(ComponentCallbackSignature)
Callback with typed signature
RefAny(AzString)
RefAny data binding with type hint
OptionType(ComponentFieldTypeBox)
Optional value (recursive via Box)
VecType(ComponentFieldTypeBox)
Vec of values (recursive via Box)
StructRef(AzString)
Reference to a struct defined in the same library
EnumRef(AzString)
Reference to an enum defined in the same library
Implementations§
Source§impl ComponentFieldType
impl ComponentFieldType
Sourcepub fn parse(s: &str) -> Option<ComponentFieldType>
pub fn parse(s: &str) -> Option<ComponentFieldType>
Parse a field type string like “String”, “OptionNone if the string cannot be parsed.
Trait Implementations§
Source§impl Clone for ComponentFieldType
impl Clone for ComponentFieldType
Source§fn clone(&self) -> ComponentFieldType
fn clone(&self) -> ComponentFieldType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ComponentFieldType
impl Debug for ComponentFieldType
Source§impl Display for ComponentFieldType
impl Display for ComponentFieldType
Source§impl Hash for ComponentFieldType
impl Hash for ComponentFieldType
Source§impl Ord for ComponentFieldType
impl Ord for ComponentFieldType
Source§fn cmp(&self, other: &ComponentFieldType) -> Ordering
fn cmp(&self, other: &ComponentFieldType) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ComponentFieldType
impl PartialEq for ComponentFieldType
Source§fn eq(&self, other: &ComponentFieldType) -> bool
fn eq(&self, other: &ComponentFieldType) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ComponentFieldType
impl PartialOrd for ComponentFieldType
impl Eq for ComponentFieldType
impl StructuralPartialEq for ComponentFieldType
Auto Trait Implementations§
impl Freeze for ComponentFieldType
impl RefUnwindSafe for ComponentFieldType
impl !Send for ComponentFieldType
impl !Sync for ComponentFieldType
impl Unpin for ComponentFieldType
impl UnsafeUnpin for ComponentFieldType
impl UnwindSafe for ComponentFieldType
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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 more