pub struct PlanningContext { /* private fields */ }Expand description
Inputs shared by every candidate in one planning cycle.
Implementations§
Source§impl PlanningContext
impl PlanningContext
Sourcepub fn new(
business_value: BenefitScore,
budget: u64,
maximum_risk: RiskScore,
) -> Self
pub fn new( business_value: BenefitScore, budget: u64, maximum_risk: RiskScore, ) -> Self
Creates a planning context requiring positive utility.
Sourcepub fn with_minimum_utility(self, minimum_utility: UtilityScore) -> Self
pub fn with_minimum_utility(self, minimum_utility: UtilityScore) -> Self
Sets the minimum utility required for a candidate and its dependencies.
Sourcepub fn business_value(&self) -> BenefitScore
pub fn business_value(&self) -> BenefitScore
Returns target business value.
Sourcepub fn maximum_risk(&self) -> RiskScore
pub fn maximum_risk(&self) -> RiskScore
Returns the maximum accepted action risk.
Sourcepub fn minimum_utility(&self) -> UtilityScore
pub fn minimum_utility(&self) -> UtilityScore
Returns the minimum accepted utility.
Trait Implementations§
Source§impl Clone for PlanningContext
impl Clone for PlanningContext
Source§fn clone(&self) -> PlanningContext
fn clone(&self) -> PlanningContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PlanningContext
Source§impl Debug for PlanningContext
impl Debug for PlanningContext
Source§impl<'de> Deserialize<'de> for PlanningContext
impl<'de> Deserialize<'de> for PlanningContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PlanningContext
Source§impl PartialEq for PlanningContext
impl PartialEq for PlanningContext
Source§impl Serialize for PlanningContext
impl Serialize for PlanningContext
impl StructuralPartialEq for PlanningContext
Auto Trait Implementations§
impl Freeze for PlanningContext
impl RefUnwindSafe for PlanningContext
impl Send for PlanningContext
impl Sync for PlanningContext
impl Unpin for PlanningContext
impl UnsafeUnpin for PlanningContext
impl UnwindSafe for PlanningContext
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more