#[repr(C)]pub struct KernelDecision {Show 13 fields
pub request_sequence: u64,
pub action: KernelAction,
pub reason: KernelReason,
pub selected_model_id: u32,
pub selected_model_index: u16,
pub estimated_cost_microunits: u64,
pub expected_utility_microunits: i64,
pub counterfactual_model_id: u32,
pub counterfactual_utility_microunits: i64,
pub evaluated_models: u16,
pub eligible_models: u16,
pub policy_epoch: u64,
pub catalog_epoch: u64,
}Expand description
The result of evaluating a KernelInput against a PolicySnapshot.
Fields§
§request_sequence: u64Echoed from the input.
action: KernelActionWhat to do: execute, substitute, or reject.
reason: KernelReasonWhy this action was chosen.
selected_model_id: u32The model that was selected (0 if rejected).
selected_model_index: u16Index of the selected model in the catalog.
estimated_cost_microunits: u64Estimated cost of the selected model, in microunits.
expected_utility_microunits: i64Expected utility of the selected model.
counterfactual_model_id: u32The second-best model (for counterfactual analysis).
counterfactual_utility_microunits: i64Utility of the counterfactual model.
evaluated_models: u16How many models were evaluated.
eligible_models: u16How many models passed all constraints.
policy_epoch: u64Policy version used for this decision.
catalog_epoch: u64Catalog version used for this decision.
Trait Implementations§
Source§impl Clone for KernelDecision
impl Clone for KernelDecision
Source§fn clone(&self) -> KernelDecision
fn clone(&self) -> KernelDecision
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 KernelDecision
Source§impl Debug for KernelDecision
impl Debug for KernelDecision
Source§impl<'de> Deserialize<'de> for KernelDecision
impl<'de> Deserialize<'de> for KernelDecision
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 KernelDecision
Source§impl PartialEq for KernelDecision
impl PartialEq for KernelDecision
Source§fn eq(&self, other: &KernelDecision) -> bool
fn eq(&self, other: &KernelDecision) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for KernelDecision
impl Serialize for KernelDecision
impl StructuralPartialEq for KernelDecision
Auto Trait Implementations§
impl Freeze for KernelDecision
impl RefUnwindSafe for KernelDecision
impl Send for KernelDecision
impl Sync for KernelDecision
impl Unpin for KernelDecision
impl UnsafeUnpin for KernelDecision
impl UnwindSafe for KernelDecision
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.