pub struct Assumption {
pub field: PolicyField,
pub value: Box<str>,
pub source: AssumptionSource,
pub impact: ImpactEstimate,
}Expand description
One decision made on the caller’s behalf.
Fields§
§field: PolicyFieldWhich decision.
value: Box<str>What was decided.
source: AssumptionSourceWhere the decision came from.
impact: ImpactEstimateHow much it could have mattered.
Implementations§
Source§impl Assumption
impl Assumption
Sourcepub fn new(
field: PolicyField,
value: impl Into<Box<str>>,
source: AssumptionSource,
impact: ImpactEstimate,
) -> Self
pub fn new( field: PolicyField, value: impl Into<Box<str>>, source: AssumptionSource, impact: ImpactEstimate, ) -> Self
Records a decision.
Sourcepub fn is_silent_and_material(&self) -> bool
pub fn is_silent_and_material(&self) -> bool
Returns true when the caller did not choose this and it could matter.
These are the assumptions worth surfacing: a default the caller never saw that changed the answer is the failure this whole layer exists to expose.
Trait Implementations§
Source§impl Clone for Assumption
impl Clone for Assumption
Source§impl Debug for Assumption
impl Debug for Assumption
Source§impl PartialEq for Assumption
impl PartialEq for Assumption
impl StructuralPartialEq for Assumption
Auto Trait Implementations§
impl Freeze for Assumption
impl RefUnwindSafe for Assumption
impl Send for Assumption
impl Sync for Assumption
impl Unpin for Assumption
impl UnsafeUnpin for Assumption
impl UnwindSafe for Assumption
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more