Struct EnumeratorShape
pub struct EnumeratorShape {
pub name: Cow<'static, str>,
pub value: Option<i64>,
}Expand description
Describes a single enumerator entry: display name and ordinal value. Used in GodotShape::Enum.
Fields§
§name: Cow<'static, str>§value: Option<i64>Ordinal value. None for string-backed enums (hint string omits ordinals: "Grass,Rock,Water").
Implementations§
§impl EnumeratorShape
impl EnumeratorShape
pub const fn new_int(name: &'static str, value: i64) -> EnumeratorShape
pub const fn new_int(name: &'static str, value: i64) -> EnumeratorShape
Creates a new int-backed enumerator.
pub const fn new_string(name: &'static str) -> EnumeratorShape
pub const fn new_string(name: &'static str) -> EnumeratorShape
Creates a new string-backed enumerator (no ordinal in hint string).
Trait Implementations§
§impl Clone for EnumeratorShape
impl Clone for EnumeratorShape
§fn clone(&self) -> EnumeratorShape
fn clone(&self) -> EnumeratorShape
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 EnumeratorShape
impl RefUnwindSafe for EnumeratorShape
impl Send for EnumeratorShape
impl Sync for EnumeratorShape
impl Unpin for EnumeratorShape
impl UnsafeUnpin for EnumeratorShape
impl UnwindSafe for EnumeratorShape
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