[−][src]Trait accelerometer::Vector
Vectors with numeric components
Associated Types
type Axes: ArrayLength<Self::Component>
Number of axes
type Component: Component
Type representing measured acceleration for a particular axis
Associated Constants
const MIN: Self::Component
Smallest value representable by a vector component
const MAX: Self::Component
Largest value representable by a vector component
Required methods
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = Self::Component>,
I: IntoIterator<Item = Self::Component>,
Instantiate a Vector
from an iterator over Self::Component
values.
Panics of the iterator is not the correct length.
fn get(self, index: usize) -> Option<Self::Component>
Get the component value for a particular index
fn to_array(self) -> GenericArray<Self::Component, Self::Axes>
Obtain an array of the acceleration components for each of the axes
Provided methods
fn from_slice(slice: &[Self::Component]) -> Self
Instantiate a vector from a slice of components.
Panics if the slice is not the right size.
ⓘImportant traits for Iter<'a, V>fn iter(&self) -> Iter<Self>
ⓘImportant traits for Iter<'a, V>
Iterate over the components of a vector
Implementors
impl Vector for F32x2
[src]
type Component = f32
type Axes = UInt<UInt<UTerm, B1>, B0>
const MIN: f32
[src]
const MAX: f32
[src]
fn from_iter<I>(into_iter: I) -> F32x2 where
I: IntoIterator<Item = <F32x2 as Vector>::Component>,
[src]
I: IntoIterator<Item = <F32x2 as Vector>::Component>,
fn get(self, i: usize) -> Option<<F32x2 as Vector>::Component>
[src]
fn to_array(self) -> GenericArray<f32, UInt<UInt<UTerm, B1>, B0>>
[src]
impl Vector for F32x3
[src]
type Component = f32
type Axes = UInt<UInt<UTerm, B1>, B1>
const MIN: f32
[src]
const MAX: f32
[src]
fn from_iter<I>(into_iter: I) -> F32x3 where
I: IntoIterator<Item = <F32x3 as Vector>::Component>,
[src]
I: IntoIterator<Item = <F32x3 as Vector>::Component>,
fn get(self, i: usize) -> Option<<F32x3 as Vector>::Component>
[src]
fn to_array(self) -> GenericArray<f32, UInt<UInt<UTerm, B1>, B1>>
[src]
impl Vector for I16x2
[src]
type Component = i16
type Axes = UInt<UInt<UTerm, B1>, B0>
const MIN: i16
[src]
const MAX: i16
[src]
fn from_iter<I>(into_iter: I) -> I16x2 where
I: IntoIterator<Item = <I16x2 as Vector>::Component>,
[src]
I: IntoIterator<Item = <I16x2 as Vector>::Component>,
fn get(self, i: usize) -> Option<<I16x2 as Vector>::Component>
[src]
fn to_array(self) -> GenericArray<i16, UInt<UInt<UTerm, B1>, B0>>
[src]
impl Vector for I16x3
[src]
type Component = i16
type Axes = UInt<UInt<UTerm, B1>, B1>
const MIN: i16
[src]
const MAX: i16
[src]
fn from_iter<I>(into_iter: I) -> I16x3 where
I: IntoIterator<Item = <I16x3 as Vector>::Component>,
[src]
I: IntoIterator<Item = <I16x3 as Vector>::Component>,
fn get(self, i: usize) -> Option<<I16x3 as Vector>::Component>
[src]
fn to_array(self) -> GenericArray<i16, UInt<UInt<UTerm, B1>, B1>>
[src]
impl Vector for I32x2
[src]
type Component = i32
type Axes = UInt<UInt<UTerm, B1>, B0>
const MIN: i32
[src]
const MAX: i32
[src]
fn from_iter<I>(into_iter: I) -> I32x2 where
I: IntoIterator<Item = <I32x2 as Vector>::Component>,
[src]
I: IntoIterator<Item = <I32x2 as Vector>::Component>,
fn get(self, i: usize) -> Option<<I32x2 as Vector>::Component>
[src]
fn to_array(self) -> GenericArray<i32, UInt<UInt<UTerm, B1>, B0>>
[src]
impl Vector for I32x3
[src]
type Component = i32
type Axes = UInt<UInt<UTerm, B1>, B1>
const MIN: i32
[src]
const MAX: i32
[src]
fn from_iter<I>(into_iter: I) -> I32x3 where
I: IntoIterator<Item = <I32x3 as Vector>::Component>,
[src]
I: IntoIterator<Item = <I32x3 as Vector>::Component>,
fn get(self, i: usize) -> Option<<I32x3 as Vector>::Component>
[src]
fn to_array(self) -> GenericArray<i32, UInt<UInt<UTerm, B1>, B1>>
[src]
impl Vector for I8x2
[src]
type Component = i8
type Axes = UInt<UInt<UTerm, B1>, B0>
const MIN: i8
[src]
const MAX: i8
[src]
fn from_iter<I>(into_iter: I) -> I8x2 where
I: IntoIterator<Item = <I8x2 as Vector>::Component>,
[src]
I: IntoIterator<Item = <I8x2 as Vector>::Component>,
fn get(self, i: usize) -> Option<<I8x2 as Vector>::Component>
[src]
fn to_array(self) -> GenericArray<i8, UInt<UInt<UTerm, B1>, B0>>
[src]
impl Vector for I8x3
[src]
type Component = i8
type Axes = UInt<UInt<UTerm, B1>, B1>
const MIN: i8
[src]
const MAX: i8
[src]
fn from_iter<I>(into_iter: I) -> I8x3 where
I: IntoIterator<Item = <I8x3 as Vector>::Component>,
[src]
I: IntoIterator<Item = <I8x3 as Vector>::Component>,
fn get(self, i: usize) -> Option<<I8x3 as Vector>::Component>
[src]
fn to_array(self) -> GenericArray<i8, UInt<UInt<UTerm, B1>, B1>>
[src]
impl Vector for U16x2
[src]
type Component = u16
type Axes = UInt<UInt<UTerm, B1>, B0>
const MIN: u16
[src]
const MAX: u16
[src]
fn from_iter<I>(into_iter: I) -> U16x2 where
I: IntoIterator<Item = <U16x2 as Vector>::Component>,
[src]
I: IntoIterator<Item = <U16x2 as Vector>::Component>,
fn get(self, i: usize) -> Option<<U16x2 as Vector>::Component>
[src]
fn to_array(self) -> GenericArray<u16, UInt<UInt<UTerm, B1>, B0>>
[src]
impl Vector for U16x3
[src]
type Component = u16
type Axes = UInt<UInt<UTerm, B1>, B1>
const MIN: u16
[src]
const MAX: u16
[src]
fn from_iter<I>(into_iter: I) -> U16x3 where
I: IntoIterator<Item = <U16x3 as Vector>::Component>,
[src]
I: IntoIterator<Item = <U16x3 as Vector>::Component>,
fn get(self, i: usize) -> Option<<U16x3 as Vector>::Component>
[src]
fn to_array(self) -> GenericArray<u16, UInt<UInt<UTerm, B1>, B1>>
[src]
impl Vector for U32x2
[src]
type Component = u32
type Axes = UInt<UInt<UTerm, B1>, B0>
const MIN: u32
[src]
const MAX: u32
[src]
fn from_iter<I>(into_iter: I) -> U32x2 where
I: IntoIterator<Item = <U32x2 as Vector>::Component>,
[src]
I: IntoIterator<Item = <U32x2 as Vector>::Component>,
fn get(self, i: usize) -> Option<<U32x2 as Vector>::Component>
[src]
fn to_array(self) -> GenericArray<u32, UInt<UInt<UTerm, B1>, B0>>
[src]
impl Vector for U32x3
[src]
type Component = u32
type Axes = UInt<UInt<UTerm, B1>, B1>
const MIN: u32
[src]
const MAX: u32
[src]
fn from_iter<I>(into_iter: I) -> U32x3 where
I: IntoIterator<Item = <U32x3 as Vector>::Component>,
[src]
I: IntoIterator<Item = <U32x3 as Vector>::Component>,
fn get(self, i: usize) -> Option<<U32x3 as Vector>::Component>
[src]
fn to_array(self) -> GenericArray<u32, UInt<UInt<UTerm, B1>, B1>>
[src]
impl Vector for U8x2
[src]
type Component = u8
type Axes = UInt<UInt<UTerm, B1>, B0>
const MIN: u8
[src]
const MAX: u8
[src]
fn from_iter<I>(into_iter: I) -> U8x2 where
I: IntoIterator<Item = <U8x2 as Vector>::Component>,
[src]
I: IntoIterator<Item = <U8x2 as Vector>::Component>,
fn get(self, i: usize) -> Option<<U8x2 as Vector>::Component>
[src]
fn to_array(self) -> GenericArray<u8, UInt<UInt<UTerm, B1>, B0>>
[src]
impl Vector for U8x3
[src]
type Component = u8
type Axes = UInt<UInt<UTerm, B1>, B1>
const MIN: u8
[src]
const MAX: u8
[src]
fn from_iter<I>(into_iter: I) -> U8x3 where
I: IntoIterator<Item = <U8x3 as Vector>::Component>,
[src]
I: IntoIterator<Item = <U8x3 as Vector>::Component>,