[−][src]Struct diplomacy::order::Order
An order is issued by a nation and gives a command to a unit in a region.
Fields
nation: Nation
The nation to which the commanded unit (or province) belongs.
region: L
The region in which the addressed unit resides (except for build commands).
unit_type: UnitType
The type of unit addressed.
command: C
The command dispatched to the order's region.
Implementations
impl<L: Location, C: Command<L>> Order<L, C>
[src]
pub fn new(nation: Nation, unit_type: UnitType, region: L, command: C) -> Self
[src]
Create a new order.
pub fn unit_position(&self) -> UnitPosition<&L>
[src]
Trait Implementations
impl<L: Clone + Location, C: Clone + Command<L>> Clone for Order<L, C>
[src]
impl<L: Location, C: Command<L>> Command<L> for Order<L, C>
[src]
fn move_dest(&self) -> Option<&L>
[src]
fn is_move(&self) -> bool
[src]
fn is_move_to_province(&self, p: &L::Province) -> bool
[src]
impl<L: Location, C: Command<L>> Debug for Order<L, C>
[src]
impl<L: Location, C: Command<L>> Display for Order<L, C>
[src]
impl<L: Eq + Location, C: Eq + Command<L>> Eq for Order<L, C>
[src]
impl<'a, L: Location, C: Command<L>> From<&'a Order<L, C>> for Unit<'a>
[src]
impl<'a, L: Location, C: Command<L>> From<&'a Order<L, C>> for UnitPosition<'a, &'a L>
[src]
impl<L: Location + FromStr<Err = Error>, C: Command<L> + FromWords<Err = Error>> FromStr for Order<L, C>
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Error>
[src]
impl<L: Hash + Location, C: Hash + Command<L>> Hash for Order<L, C>
[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<L: Ord + Location, C: Ord + Command<L>> Ord for Order<L, C>
[src]
fn cmp(&self, other: &Order<L, C>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<L: PartialEq + Location, C: PartialEq + Command<L>> PartialEq<Order<L, C>> for Order<L, C>
[src]
impl<L: Location> PartialEq<Order<L, MainCommand<L>>> for SupportedOrder<L>
[src]
fn eq(&self, other: &Order<L, MainCommand<L>>) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<L: Location> PartialEq<Order<L, MainCommand<L>>> for ConvoyedMove<L>
[src]
fn eq(&self, rhs: &Order<L, MainCommand<L>>) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<L: PartialOrd + Location, C: PartialOrd + Command<L>> PartialOrd<Order<L, C>> for Order<L, C>
[src]
fn partial_cmp(&self, other: &Order<L, C>) -> Option<Ordering>
[src]
fn lt(&self, other: &Order<L, C>) -> bool
[src]
fn le(&self, other: &Order<L, C>) -> bool
[src]
fn gt(&self, other: &Order<L, C>) -> bool
[src]
fn ge(&self, other: &Order<L, C>) -> bool
[src]
impl<L: Location, C: Command<L>> StructuralEq for Order<L, C>
[src]
impl<L: Location, C: Command<L>> StructuralPartialEq for Order<L, C>
[src]
Auto Trait Implementations
impl<L, C> RefUnwindSafe for Order<L, C> where
C: RefUnwindSafe,
L: RefUnwindSafe,
C: RefUnwindSafe,
L: RefUnwindSafe,
impl<L, C> Send for Order<L, C> where
C: Send,
L: Send,
C: Send,
L: Send,
impl<L, C> Sync for Order<L, C> where
C: Sync,
L: Sync,
C: Sync,
L: Sync,
impl<L, C> Unpin for Order<L, C> where
C: Unpin,
L: Unpin,
C: Unpin,
L: Unpin,
impl<L, C> UnwindSafe for Order<L, C> where
C: UnwindSafe,
L: UnwindSafe,
C: 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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,