pub enum Consultation {
Answered {
ask: AdviserAsk,
subject: String,
answer: AdviserAnswer,
elapsed_ms: u64,
},
FellBack {
ask: AdviserAsk,
subject: String,
reason: AdviserFailure,
},
}Expand description
What one consultation produced, as the ledger keeps it and as
crate::pipeline::package acts on it.
Exhaustive: an answer and a fallback are different facts about the move the city made, and a single struct with an optional answer would let a reader forget which one they are looking at.
Variants§
Implementations§
Source§impl Consultation
impl Consultation
Sourcepub fn answer(&self) -> Option<&AdviserAnswer>
pub fn answer(&self) -> Option<&AdviserAnswer>
The answer to act on, or None when the deterministic strategy
stands. A caller that acts only on Some cannot accidentally act
on a fallback.
Trait Implementations§
Source§impl Clone for Consultation
impl Clone for Consultation
Source§impl Debug for Consultation
impl Debug for Consultation
impl Eq for Consultation
Source§impl PartialEq for Consultation
impl PartialEq for Consultation
impl StructuralPartialEq for Consultation
Auto Trait Implementations§
impl Freeze for Consultation
impl RefUnwindSafe for Consultation
impl Send for Consultation
impl Sync for Consultation
impl Unpin for Consultation
impl UnsafeUnpin for Consultation
impl UnwindSafe for Consultation
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