#[non_exhaustive]pub enum UniversalStructField {
Basic(BasicType),
String(StringType),
Struct(UniversalStructHandle),
}
Expand description
Types that can be used in a universal struct, some of which might have a default value
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Trait Implementations§
Source§impl Clone for UniversalStructField
impl Clone for UniversalStructField
Source§fn clone(&self) -> UniversalStructField
fn clone(&self) -> UniversalStructField
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 UniversalStructField
impl Debug for UniversalStructField
Source§impl From<BasicType> for UniversalStructField
impl From<BasicType> for UniversalStructField
Source§impl From<DurationType> for UniversalStructField
impl From<DurationType> for UniversalStructField
Source§fn from(x: DurationType) -> Self
fn from(x: DurationType) -> Self
Converts to this type from the input type.
Source§impl From<Handle<Enum<Unvalidated>>> for UniversalStructField
impl From<Handle<Enum<Unvalidated>>> for UniversalStructField
Source§impl From<Handle<Struct<UniversalStructField, Unvalidated>>> for UniversalStructField
impl From<Handle<Struct<UniversalStructField, Unvalidated>>> for UniversalStructField
Source§fn from(x: UniversalStructHandle) -> Self
fn from(x: UniversalStructHandle) -> Self
Converts to this type from the input type.
Source§impl From<Primitive> for UniversalStructField
impl From<Primitive> for UniversalStructField
Source§impl From<StringType> for UniversalStructField
impl From<StringType> for UniversalStructField
Source§fn from(value: StringType) -> Self
fn from(value: StringType) -> Self
Converts to this type from the input type.
Source§impl InitializerValidator for UniversalStructField
impl InitializerValidator for UniversalStructField
Source§fn validate_default_value(
&self,
value: &InitializerDefault,
) -> BindResult<ValidatedDefaultValue>
fn validate_default_value( &self, value: &InitializerDefault, ) -> BindResult<ValidatedDefaultValue>
Check that the value is valid for the type
fn bad_initializer_value( field_type: String, value: &InitializerDefault, ) -> BindResult<ValidatedDefaultValue>
Source§impl StructFieldType for UniversalStructField
impl StructFieldType for UniversalStructField
Source§fn create_struct_type(
v: Handle<Struct<UniversalStructField, Unvalidated>>,
) -> StructType<Unvalidated>
fn create_struct_type( v: Handle<Struct<UniversalStructField, Unvalidated>>, ) -> StructType<Unvalidated>
convert a structure to a StructType
Auto Trait Implementations§
impl Freeze for UniversalStructField
impl RefUnwindSafe for UniversalStructField
impl !Send for UniversalStructField
impl !Sync for UniversalStructField
impl Unpin for UniversalStructField
impl UnwindSafe for UniversalStructField
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