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, [EnumeratorShape]>,
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 (const: unstable) · 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 !Sync for GodotElementShape
impl Forget for GodotElementShape
impl Freeze for GodotElementShapewhere
*const u8 is !null: Freeze,
PhantomData<ClassId>: Freeze,
&'static [EnumeratorShape]: Freeze,
Vec<EnumeratorShape>: Freeze,
&'static str: Freeze,
String: Freeze,
PhantomData<*const u8>: Freeze,
impl Move for GodotElementShape
impl RefUnwindSafe for GodotElementShape
impl Send for GodotElementShape
impl Unpin for GodotElementShape
impl UnsafeUnpin for GodotElementShapewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<ClassId>: UnsafeUnpin,
&'static [EnumeratorShape]: UnsafeUnpin,
Vec<EnumeratorShape>: UnsafeUnpin,
&'static str: UnsafeUnpin,
String: UnsafeUnpin,
PhantomData<*const u8>: UnsafeUnpin,
impl UnwindSafe for GodotElementShapewhere
RawVecInner: UnwindSafe,
&'static [EnumeratorShape]: UnwindSafe,
Vec<EnumeratorShape>: UnwindSafe,
&'static str: UnwindSafe,
String: UnwindSafe,
*const u8: UnwindSafe,
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