[−][src]Struct diplomacy::judge::ResolverContext
The immutable inputs for a resolution equation.
Fields
world_map: &'a Map
The map against which orders were issued.
Implementations
impl<'a> ResolverContext<'a>
[src]
pub fn new(world_map: &'a Map, orders: Vec<MappedMainOrder>) -> Self
[src]
Creates a new resolver context for a set of orders on a map.
pub fn orders(&self) -> &[MappedMainOrder]
[src]
Get a view of the orders in the order they were submitted.
pub fn resolve_using<A: Adjudicate>(&'a self, rules: A) -> Outcome<'a, A>
[src]
Resolve the context using the provided adjudicator.
The adjudicator is responsible for rule questions, while the resolver is responsible for tracking whether orders are successful. The two are interdependent, calling back and forth as they work towards a solution.
pub fn resolve(&'a self) -> Outcome<'a, Rulebook>
[src]
Resolve the orders in the context using the standard rulebook
pub fn find_order_to_province(
&'a self,
p: &ProvinceKey
) -> Option<&'a MappedMainOrder>
[src]
&'a self,
p: &ProvinceKey
) -> Option<&'a MappedMainOrder>
pub fn find_order_to_region(
&'a self,
r: &RegionKey
) -> Option<&'a MappedMainOrder>
[src]
&'a self,
r: &RegionKey
) -> Option<&'a MappedMainOrder>
Trait Implementations
impl<'a> Clone for ResolverContext<'a>
[src]
fn clone(&self) -> ResolverContext<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for ResolverContext<'a>
[src]
impl<'a> Eq for ResolverContext<'a>
[src]
impl<'a> From<ResolverContext<'a>> for HashMap<MappedMainOrder, OrderState>
[src]
fn from(rc: ResolverContext<'a>) -> Self
[src]
impl<'a> PartialEq<ResolverContext<'a>> for ResolverContext<'a>
[src]
fn eq(&self, other: &ResolverContext<'a>) -> bool
[src]
fn ne(&self, other: &ResolverContext<'a>) -> bool
[src]
impl<'a> StructuralEq for ResolverContext<'a>
[src]
impl<'a> StructuralPartialEq for ResolverContext<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for ResolverContext<'a>
impl<'a> Send for ResolverContext<'a>
impl<'a> Sync for ResolverContext<'a>
impl<'a> Unpin for ResolverContext<'a>
impl<'a> UnwindSafe for ResolverContext<'a>
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>,