[−][src]Struct diplomacy::UnitPosition
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]
fn clone(&self) -> UnitPosition<'a, L>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'a, L: PartialEq> PartialEq<UnitPosition<'a, L>> for UnitPosition<'a, L>
[src]
fn eq(&self, other: &UnitPosition<'a, L>) -> bool
[src]
fn ne(&self, other: &UnitPosition<'a, L>) -> bool
[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,
L: RefUnwindSafe,
impl<'a, L> Send for UnitPosition<'a, L> where
L: Send,
L: Send,
impl<'a, L> Sync for UnitPosition<'a, L> where
L: Sync,
L: Sync,
impl<'a, L> Unpin for UnitPosition<'a, L> where
L: Unpin,
L: Unpin,
impl<'a, L> UnwindSafe for UnitPosition<'a, L> where
L: UnwindSafe,
L: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,