Enum Vector3Axis
#[repr(i32)]pub enum Vector3Axis {
X = 0,
Y = 1,
Z = 2,
}
Expand description
Enumerates the axes in a Vector3
.
Vector3
implements Index<Vector3Axis>
and IndexMut<Vector3Axis>
, so you can use this type to access a vector component as vec[axis]
.
Variants§
Trait Implementations§
§impl Clone for Vector3Axis
impl Clone for Vector3Axis
§fn clone(&self) -> Vector3Axis
fn clone(&self) -> Vector3Axis
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 Vector3Axis
impl Debug for Vector3Axis
§impl EngineEnum for Vector3Axis
impl EngineEnum for Vector3Axis
§impl FromGodot for Vector3Axis
impl FromGodot for Vector3Axis
§fn try_from_godot(
via: <Vector3Axis as GodotConvert>::Via,
) -> Result<Vector3Axis, ConvertError>
fn try_from_godot( via: <Vector3Axis as GodotConvert>::Via, ) -> Result<Vector3Axis, 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 Vector3Axis
impl GodotConvert for Vector3Axis
§impl Index<Vector3Axis> for Vector3
impl Index<Vector3Axis> for Vector3
§impl Index<Vector3Axis> for Vector3i
impl Index<Vector3Axis> for Vector3i
§impl IndexMut<Vector3Axis> for Vector3
impl IndexMut<Vector3Axis> for Vector3
§fn index_mut(&mut self, axis: Vector3Axis) -> &mut f32
fn index_mut(&mut self, axis: Vector3Axis) -> &mut f32
Performs the mutable indexing (
container[index]
) operation. Read more§impl IndexMut<Vector3Axis> for Vector3i
impl IndexMut<Vector3Axis> for Vector3i
§fn index_mut(&mut self, axis: Vector3Axis) -> &mut i32
fn index_mut(&mut self, axis: Vector3Axis) -> &mut i32
Performs the mutable indexing (
container[index]
) operation. Read more§impl Ord for Vector3Axis
impl Ord for Vector3Axis
§impl PartialEq for Vector3Axis
impl PartialEq for Vector3Axis
§impl PartialOrd for Vector3Axis
impl PartialOrd for Vector3Axis
§impl ToGodot for Vector3Axis
impl ToGodot for Vector3Axis
§type ToVia<'v> = i32
type ToVia<'v> = i32
Target type of
to_godot()
, which differs from Via
for pass-by-reference types.§fn to_godot(&self) -> <Vector3Axis as ToGodot>::ToVia<'_>
fn to_godot(&self) -> <Vector3Axis as ToGodot>::ToVia<'_>
Converts this type to the Godot type by reference, usually by cloning.
§fn to_variant(&self) -> Variant
fn to_variant(&self) -> Variant
Converts this type to a Variant.
impl Copy for Vector3Axis
impl Eq for Vector3Axis
impl StructuralPartialEq for Vector3Axis
Auto Trait Implementations§
impl Freeze for Vector3Axis
impl RefUnwindSafe for Vector3Axis
impl Send for Vector3Axis
impl Sync for Vector3Axis
impl Unpin for Vector3Axis
impl UnwindSafe for Vector3Axis
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
)