pub struct EvaluateDecisionResponse<T: DeserializeOwned> { /* private fields */ }Expand description
The response from evaluating a decision
Implementations§
Source§impl<T: DeserializeOwned> EvaluateDecisionResponse<T>
Represents the response of evaluating a decision, parameterized by the type T.
impl<T: DeserializeOwned> EvaluateDecisionResponse<T>
Represents the response of evaluating a decision, parameterized by the type T.
This struct provides various methods to access details about the evaluated decision, including its key, ID, name, version, and output, as well as information about any failures that occurred during the evaluation.
Sourcepub fn decision_key(&self) -> i64
pub fn decision_key(&self) -> i64
Returns the unique key identifying the evaluated decision.
§Returns
An i64 representing the unique key of the decision.
Sourcepub fn decision_id(&self) -> &str
pub fn decision_id(&self) -> &str
Returns the ID of the decision which was evaluated.
§Returns
A string slice representing the ID of the evaluated decision.
Sourcepub fn decision_name(&self) -> &str
pub fn decision_name(&self) -> &str
Returns the name of the decision which was evaluated.
§Returns
A string slice representing the name of the evaluated decision.
Sourcepub fn decision_version(&self) -> i32
pub fn decision_version(&self) -> i32
Returns the version of the decision which was evaluated.
§Returns
An i32 representing the version of the evaluated decision.
Sourcepub fn decision_requirements_id(&self) -> &str
pub fn decision_requirements_id(&self) -> &str
Returns the ID of the decision requirements graph that the decision is part of.
§Returns
A string slice representing the ID of the decision requirements graph.
Sourcepub fn decision_requirements_key(&self) -> i64
pub fn decision_requirements_key(&self) -> i64
Returns the unique key identifying the decision requirements graph.
§Returns
An i64 representing the unique key of the decision requirements graph.
Sourcepub fn decision_output(&self) -> &T
pub fn decision_output(&self) -> &T
Returns the output result of the decision evaluation.
§Returns
A reference to the output of the decision evaluation of type T.
Sourcepub fn evaluated_decisions(&self) -> &[EvaluatedDecision]
pub fn evaluated_decisions(&self) -> &[EvaluatedDecision]
Returns a list of all decisions that were evaluated within the requested decision evaluation.
§Returns
A slice of EvaluatedDecision representing all evaluated decisions.
Sourcepub fn failed_decision_id(&self) -> &str
pub fn failed_decision_id(&self) -> &str
Returns the ID of the decision which failed during evaluation, if any.
§Returns
A string slice representing the ID of the failed decision, if applicable.
Sourcepub fn failure_message(&self) -> &str
pub fn failure_message(&self) -> &str
Returns a message describing why the decision evaluation failed, if applicable.
§Returns
A string slice representing the failure message, if applicable.
Sourcepub fn tenant_id(&self) -> &str
pub fn tenant_id(&self) -> &str
Returns the tenant identifier of the evaluated decision.
§Returns
A string slice representing the tenant ID of the evaluated decision.
Sourcepub fn decision_instance_key(&self) -> i64
pub fn decision_instance_key(&self) -> i64
Returns the unique key identifying this decision evaluation.
§Returns
An i64 representing the unique key of this decision evaluation.
Trait Implementations§
Source§impl<T: Clone + DeserializeOwned> Clone for EvaluateDecisionResponse<T>
impl<T: Clone + DeserializeOwned> Clone for EvaluateDecisionResponse<T>
Source§fn clone(&self) -> EvaluateDecisionResponse<T>
fn clone(&self) -> EvaluateDecisionResponse<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<T> Freeze for EvaluateDecisionResponse<T>where
T: Freeze,
impl<T> RefUnwindSafe for EvaluateDecisionResponse<T>where
T: RefUnwindSafe,
impl<T> Send for EvaluateDecisionResponse<T>where
T: Send,
impl<T> Sync for EvaluateDecisionResponse<T>where
T: Sync,
impl<T> Unpin for EvaluateDecisionResponse<T>where
T: Unpin,
impl<T> UnwindSafe for EvaluateDecisionResponse<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request