#[non_exhaustive]pub enum TargetOutcome {
Resolved {
resolution: TargetResolution,
new_case: bool,
},
SameTurn {
case_ref: CaseRef,
},
NoActiveInteraction,
PolicyMismatch {
policy: TargetPolicy,
},
SeveralOpenCases,
NoTarget,
}Expand description
What resolving one act’s target produced.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Resolved
The target resolved to a core resolution.
Fields
§
resolution: TargetResolutionThe resolution.
SameTurn
The record an earlier act of the turn opens.
NoActiveInteraction
The act addressed the card on screen and there is none.
PolicyMismatch
The target is not one the operation accepts (§21.2).
Fields
§
policy: TargetPolicyThe policy that refused it.
SeveralOpenCases
A start that resumes an open case, with more than one in view.
NoTarget
The act names no record, and its operation needs one.
Implementations§
Source§impl TargetOutcome
impl TargetOutcome
Sourcepub const fn resolved(resolution: TargetResolution) -> Self
pub const fn resolved(resolution: TargetResolution) -> Self
A plain resolution of an existing case.
Sourcepub fn resolution(&self) -> Option<TargetResolution>
pub fn resolution(&self) -> Option<TargetResolution>
The core resolution, when the target resolved at all.
Sourcepub const fn is_new_case(&self) -> bool
pub const fn is_new_case(&self) -> bool
Returns true when this act opens the case.
Trait Implementations§
Source§impl Clone for TargetOutcome
impl Clone for TargetOutcome
Source§impl Debug for TargetOutcome
impl Debug for TargetOutcome
impl Eq for TargetOutcome
Source§impl PartialEq for TargetOutcome
impl PartialEq for TargetOutcome
impl StructuralPartialEq for TargetOutcome
Auto Trait Implementations§
impl Freeze for TargetOutcome
impl RefUnwindSafe for TargetOutcome
impl Send for TargetOutcome
impl Sync for TargetOutcome
impl Unpin for TargetOutcome
impl UnsafeUnpin for TargetOutcome
impl UnwindSafe for TargetOutcome
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.