#[non_exhaustive]pub enum FunctionReturnStructField {
Basic(BasicType),
ClassRef(ClassDeclarationHandle),
Iterator(AbstractIteratorHandle),
Struct(UniversalOr<FunctionReturnStructField>),
}
Expand description
Types that can be used in a function return 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.
Basic(BasicType)
ClassRef(ClassDeclarationHandle)
Iterator(AbstractIteratorHandle)
Struct(UniversalOr<FunctionReturnStructField>)
Trait Implementations§
Source§impl Clone for FunctionReturnStructField
impl Clone for FunctionReturnStructField
Source§fn clone(&self) -> FunctionReturnStructField
fn clone(&self) -> FunctionReturnStructField
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 FunctionReturnStructField
impl Debug for FunctionReturnStructField
Source§impl From<BasicType> for FunctionReturnStructField
impl From<BasicType> for FunctionReturnStructField
Source§impl From<Handle<AbstractIterator<Unvalidated>>> for FunctionReturnStructField
impl From<Handle<AbstractIterator<Unvalidated>>> for FunctionReturnStructField
Source§fn from(x: AbstractIteratorHandle) -> Self
fn from(x: AbstractIteratorHandle) -> Self
Converts to this type from the input type.
Source§impl From<Handle<ClassDeclaration>> for FunctionReturnStructField
impl From<Handle<ClassDeclaration>> for FunctionReturnStructField
Source§fn from(x: ClassDeclarationHandle) -> Self
fn from(x: ClassDeclarationHandle) -> Self
Converts to this type from the input type.
Source§impl From<Handle<Struct<FunctionReturnStructField, Unvalidated>>> for FunctionReturnStructField
impl From<Handle<Struct<FunctionReturnStructField, Unvalidated>>> for FunctionReturnStructField
Source§fn from(x: FunctionReturnStructHandle) -> Self
fn from(x: FunctionReturnStructHandle) -> Self
Converts to this type from the input type.
Source§impl From<Primitive> for FunctionReturnStructField
impl From<Primitive> for FunctionReturnStructField
Source§impl InitializerValidator for FunctionReturnStructField
impl InitializerValidator for FunctionReturnStructField
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 FunctionReturnStructField
impl StructFieldType for FunctionReturnStructField
Source§fn create_struct_type(
v: Handle<Struct<Self, Unvalidated>>,
) -> StructType<Unvalidated>
fn create_struct_type( v: Handle<Struct<Self, Unvalidated>>, ) -> StructType<Unvalidated>
convert a structure to a StructType
Auto Trait Implementations§
impl Freeze for FunctionReturnStructField
impl RefUnwindSafe for FunctionReturnStructField
impl !Send for FunctionReturnStructField
impl !Sync for FunctionReturnStructField
impl Unpin for FunctionReturnStructField
impl UnwindSafe for FunctionReturnStructField
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