Struct direction::DirectionTable
source · pub struct DirectionTable<T> { /* private fields */ }
Implementations
sourceimpl<T> DirectionTable<T>
impl<T> DirectionTable<T>
pub fn new_fn<F: FnMut(Direction) -> T>(f: F) -> Self
pub const fn new_array(values: [T; 8]) -> Self
pub fn set(&mut self, direction: Direction, value: T)
pub fn get(&self, direction: Direction) -> &T
pub fn get_mut(&mut self, direction: Direction) -> &mut T
pub fn iter(&self) -> DirectionTableIter<'_, T>
pub fn iter_mut(&mut self) -> DirectionTableIterMut<'_, T>
sourceimpl<T: Clone> DirectionTable<T>
impl<T: Clone> DirectionTable<T>
sourceimpl<T: Default> DirectionTable<T>
impl<T: Default> DirectionTable<T>
pub fn new_default() -> Self
Trait Implementations
sourceimpl<T: Clone> Clone for DirectionTable<T>
impl<T: Clone> Clone for DirectionTable<T>
sourcefn clone(&self) -> DirectionTable<T>
fn clone(&self) -> DirectionTable<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<T: Debug> Debug for DirectionTable<T>
impl<T: Debug> Debug for DirectionTable<T>
sourceimpl<T: Default> Default for DirectionTable<T>
impl<T: Default> Default for DirectionTable<T>
sourcefn default() -> DirectionTable<T>
fn default() -> DirectionTable<T>
Returns the “default value” for a type. Read more
sourceimpl<T: Hash> Hash for DirectionTable<T>
impl<T: Hash> Hash for DirectionTable<T>
sourceimpl<T: Ord> Ord for DirectionTable<T>
impl<T: Ord> Ord for DirectionTable<T>
sourcefn cmp(&self, other: &DirectionTable<T>) -> Ordering
fn cmp(&self, other: &DirectionTable<T>) -> Ordering
1.21.0 · sourcefn 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
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<T: PartialEq> PartialEq<DirectionTable<T>> for DirectionTable<T>
impl<T: PartialEq> PartialEq<DirectionTable<T>> for DirectionTable<T>
sourcefn eq(&self, other: &DirectionTable<T>) -> bool
fn eq(&self, other: &DirectionTable<T>) -> bool
sourceimpl<T: PartialOrd> PartialOrd<DirectionTable<T>> for DirectionTable<T>
impl<T: PartialOrd> PartialOrd<DirectionTable<T>> for DirectionTable<T>
sourcefn partial_cmp(&self, other: &DirectionTable<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &DirectionTable<T>) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<T: Eq> Eq for DirectionTable<T>
impl<T> StructuralEq for DirectionTable<T>
impl<T> StructuralPartialEq for DirectionTable<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for DirectionTable<T>where
T: RefUnwindSafe,
impl<T> Send for DirectionTable<T>where
T: Send,
impl<T> Sync for DirectionTable<T>where
T: Sync,
impl<T> Unpin for DirectionTable<T>where
T: Unpin,
impl<T> UnwindSafe for DirectionTable<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more