pub struct Direction<T: Clone + Copy> {
nw: Option<T>,
ne: Option<T>,
se: Option<T>,
sw: Option<T>,
}
Expand description
Standard diagonal movements given by north west/east etc
Used as an absolute measure, i.e. not relative to the team making a move
Use options for when movements are blocked/unallowed contextually
Fields
nw: Option<T>
North West
ne: Option<T>
North East
se: Option<T>
South East
sw: Option<T>
South West
Implementations
Trait Implementations
impl<T: Copy + Clone + Copy> Copy for Direction<T>
impl<T: Eq + Clone + Copy> Eq for Direction<T>
impl<T: Clone + Copy> StructuralEq for Direction<T>
impl<T: Clone + Copy> StructuralPartialEq for Direction<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Direction<T> where
T: RefUnwindSafe,
impl<T> Send for Direction<T> where
T: Send,
impl<T> Sync for Direction<T> where
T: Sync,
impl<T> Unpin for Direction<T> where
T: Unpin,
impl<T> UnwindSafe for Direction<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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