#[repr(i32)]pub enum Vector2Axis {
X = 0,
Y = 1,
}
Expand description
Enumerates the axes in a Vector2
.
Vector2
implements Index<Vector2Axis>
and IndexMut<Vector2Axis>
, so you can use this type to access a vector component as vec[axis]
.
Variants§
Trait Implementations§
Source§impl Clone for Vector2Axis
impl Clone for Vector2Axis
Source§fn clone(&self) -> Vector2Axis
fn clone(&self) -> Vector2Axis
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 moreSource§impl Debug for Vector2Axis
impl Debug for Vector2Axis
Source§impl DynamicSend for Vector2Axis
impl DynamicSend for Vector2Axis
type Inner = Vector2Axis
fn extract_if_safe(self) -> Option<<Vector2Axis as DynamicSend>::Inner>
Source§impl EngineEnum for Vector2Axis
impl EngineEnum for Vector2Axis
fn try_from_ord(ord: i32) -> Option<Vector2Axis>
Source§fn ord(self) -> i32
fn ord(self) -> i32
Ordinal value of the enumerator, as specified in Godot.
This is not necessarily unique.
Source§fn godot_name(&self) -> &'static str
fn godot_name(&self) -> &'static str
👎Deprecated: Moved to introspection API, see
EngineEnum::all_constants()
and EnumConstant::godot_name()
The equivalent name of the enumerator, as specified in Godot. Read more
Source§fn values() -> &'static [Vector2Axis]
fn values() -> &'static [Vector2Axis]
Returns a slice of distinct enum values. Read more
Source§fn all_constants() -> &'static [EnumConstant<Vector2Axis>]
fn all_constants() -> &'static [EnumConstant<Vector2Axis>]
Returns metadata for all enum constants. Read more
fn from_ord(ord: i32) -> Self
Source§impl FromGodot for Vector2Axis
impl FromGodot for Vector2Axis
Source§fn try_from_godot(
via: <Vector2Axis as GodotConvert>::Via,
) -> Result<Vector2Axis, ConvertError>
fn try_from_godot( via: <Vector2Axis as GodotConvert>::Via, ) -> Result<Vector2Axis, ConvertError>
Converts the Godot representation to this type, returning
Err
on failure.Source§fn from_godot(via: Self::Via) -> Self
fn from_godot(via: Self::Via) -> Self
⚠️ Converts the Godot representation to this type. Read more
Source§fn try_from_variant(variant: &Variant) -> Result<Self, ConvertError>
fn try_from_variant(variant: &Variant) -> Result<Self, ConvertError>
Performs the conversion from a
Variant
, returning Err
on failure.Source§impl GodotConvert for Vector2Axis
impl GodotConvert for Vector2Axis
Source§impl Hash for Vector2Axis
impl Hash for Vector2Axis
Source§impl Index<Vector2Axis> for Vector2
impl Index<Vector2Axis> for Vector2
Source§impl Index<Vector2Axis> for Vector2i
impl Index<Vector2Axis> for Vector2i
Source§impl IndexMut<Vector2Axis> for Vector2
impl IndexMut<Vector2Axis> for Vector2
Source§impl IndexMut<Vector2Axis> for Vector2i
impl IndexMut<Vector2Axis> for Vector2i
Source§impl IntoDynamicSend for Vector2Axis
impl IntoDynamicSend for Vector2Axis
type Target = Vector2Axis
fn into_dynamic_send(self) -> <Vector2Axis as IntoDynamicSend>::Target
Source§impl Ord for Vector2Axis
impl Ord for Vector2Axis
Source§fn cmp(&self, other: &Vector2Axis) -> Ordering
fn cmp(&self, other: &Vector2Axis) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Vector2Axis
impl PartialEq for Vector2Axis
Source§impl PartialOrd for Vector2Axis
impl PartialOrd for Vector2Axis
Source§impl ToGodot for Vector2Axis
impl ToGodot for Vector2Axis
impl Copy for Vector2Axis
impl Eq for Vector2Axis
impl StructuralPartialEq for Vector2Axis
Auto Trait Implementations§
impl Freeze for Vector2Axis
impl RefUnwindSafe for Vector2Axis
impl Send for Vector2Axis
impl Sync for Vector2Axis
impl Unpin for Vector2Axis
impl UnwindSafe for Vector2Axis
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