Enum Vector2Axis
#[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§
§impl Clone for Vector2Axis
impl Clone for Vector2Axis
§fn clone(&self) -> Vector2Axis
fn clone(&self) -> Vector2Axis
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 more§impl Debug for Vector2Axis
impl Debug for Vector2Axis
§impl EngineEnum for Vector2Axis
impl EngineEnum for Vector2Axis
§impl FromGodot for Vector2Axis
impl FromGodot for Vector2Axis
§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.§fn from_godot(via: Self::Via) -> Self
fn from_godot(via: Self::Via) -> Self
⚠️ Converts the Godot representation to this type. Read more
§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.§fn from_variant(variant: &Variant) -> Self
fn from_variant(variant: &Variant) -> Self
§impl GodotConvert for Vector2Axis
impl GodotConvert for Vector2Axis
§impl Index<Vector2Axis> for Vector2
impl Index<Vector2Axis> for Vector2
§impl Index<Vector2Axis> for Vector2i
impl Index<Vector2Axis> for Vector2i
§impl IndexMut<Vector2Axis> for Vector2
impl IndexMut<Vector2Axis> for Vector2
§fn index_mut(&mut self, axis: Vector2Axis) -> &mut f32
fn index_mut(&mut self, axis: Vector2Axis) -> &mut f32
Performs the mutable indexing (
container[index]
) operation. Read more§impl IndexMut<Vector2Axis> for Vector2i
impl IndexMut<Vector2Axis> for Vector2i
§fn index_mut(&mut self, axis: Vector2Axis) -> &mut i32
fn index_mut(&mut self, axis: Vector2Axis) -> &mut i32
Performs the mutable indexing (
container[index]
) operation. Read more§impl Ord for Vector2Axis
impl Ord for Vector2Axis
§impl PartialEq for Vector2Axis
impl PartialEq for Vector2Axis
§impl PartialOrd for Vector2Axis
impl PartialOrd for Vector2Axis
§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)