Enum GodotElementShape
#[non_exhaustive]pub enum GodotElementShape {
Variant,
Builtin {
variant_type: VariantType,
},
Class {
class_id: ClassId,
heritage: ClassHeritage,
},
Enum {
variant_type: VariantType,
enumerators: Cow<'static, [Enumerator]>,
godot_name: Option<Cow<'static, str>>,
is_bitfield: bool,
},
Custom {
variant_type: VariantType,
var_hint: PropertyHintInfo,
export_hint: PropertyHintInfo,
class_name: Option<Cow<'static, str>>,
usage_flags: PropertyUsageFlags,
},
}Expand description
Same as GodotShape, but for element types nested in typed arrays/dictionaries.
Matches the same layout as GodotShape, exists to avoid recursive definition (and also Box allocations). Also constrains the possible
shapes (elements cannot be typed arrays/dictionaries themselves).
In contrast to ElementType, this is a static type description for Godot registration purposes.
Use into_outer() to convert into a full GodotShape.
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.
Variant
Builtin
Fields
§
variant_type: VariantTypeClass
Enum
Custom
Fields
§
variant_type: VariantType§
var_hint: PropertyHintInfo§
export_hint: PropertyHintInfo§
usage_flags: PropertyUsageFlagsImplementations§
§impl GodotElementShape
impl GodotElementShape
pub fn into_outer(self) -> GodotShape
pub fn into_outer(self) -> GodotShape
Converts this nested shape into a full GodotShape. Infallible.
Trait Implementations§
§impl Clone for GodotElementShape
impl Clone for GodotElementShape
§fn clone(&self) -> GodotElementShape
fn clone(&self) -> GodotElementShape
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for GodotElementShape
impl RefUnwindSafe for GodotElementShape
impl Send for GodotElementShape
impl !Sync for GodotElementShape
impl Unpin for GodotElementShape
impl UnsafeUnpin for GodotElementShape
impl UnwindSafe for GodotElementShape
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