[][src]Struct diplomacy::UnitPosition

pub struct UnitPosition<'a, L = &'a RegionKey> {
    pub unit: Unit<'a>,
    pub region: L,
}

A unit's instantaneous position in a region.

Fields

unit: Unit<'a>region: L

The unit's current location.

Implementations

impl<'a, L> UnitPosition<'a, L>[src]

pub fn new(unit: Unit<'a>, region: L) -> Self[src]

Create a new unit at a given position.

pub fn nation(&self) -> &Nation[src]

Trait Implementations

impl<'a, L: Clone> Clone for UnitPosition<'a, L>[src]

impl<'a, L: Debug> Debug for UnitPosition<'a, L>[src]

impl<'a, L: Eq> Eq for UnitPosition<'a, L>[src]

impl<'a, L: Location, C: Command<L>> From<&'a Order<L, C>> for UnitPosition<'a, &'a L>[src]

impl<'a, L: Hash> Hash for UnitPosition<'a, L>[src]

impl<'a, L: PartialEq> PartialEq<UnitPosition<'a, L>> for UnitPosition<'a, L>[src]

impl<'a, L> StructuralEq for UnitPosition<'a, L>[src]

impl<'a, L> StructuralPartialEq for UnitPosition<'a, L>[src]

Auto Trait Implementations

impl<'a, L> RefUnwindSafe for UnitPosition<'a, L> where
    L: RefUnwindSafe

impl<'a, L> Send for UnitPosition<'a, L> where
    L: Send

impl<'a, L> Sync for UnitPosition<'a, L> where
    L: Sync

impl<'a, L> Unpin for UnitPosition<'a, L> where
    L: Unpin

impl<'a, L> UnwindSafe for UnitPosition<'a, L> where
    L: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.