Skip to main content

IVectorExt

Trait IVectorExt 

Source
pub trait IVectorExt: Sized + Copy {
    // Required methods
    fn ivget(&self, i: usize) -> i32;
    fn ivset(&mut self, i: usize, val: i32);
}
Expand description

Extension trait for integer vector types with index-based component access.

Provides SPIR-V compatible replacement for bracket indexing on glam integer vectors.

Required Methods§

Source

fn ivget(&self, i: usize) -> i32

Gets the i-th component of the integer vector by index.

Source

fn ivset(&mut self, i: usize, val: i32)

Sets the i-th component of the integer vector by index.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl IVectorExt for IVec2

Source§

fn ivget(&self, i: usize) -> i32

Source§

fn ivset(&mut self, i: usize, val: i32)

Implementors§