pub struct PlanEvaluationResponse {
pub plan_id: String,
pub plan_verdict: PlanVerdict,
pub step_verdicts: Vec<StepVerdict>,
}Expand description
Response body for POST /evaluate-plan.
Fields§
§plan_id: StringEchoed plan identifier.
plan_verdict: PlanVerdictAggregate verdict across every step.
step_verdicts: Vec<StepVerdict>Per-step verdicts in original submission order.
Implementations§
Source§impl PlanEvaluationResponse
impl PlanEvaluationResponse
Sourcepub fn aggregate(step_verdicts: &[StepVerdict]) -> PlanVerdict
pub fn aggregate(step_verdicts: &[StepVerdict]) -> PlanVerdict
Compute the aggregate verdict from a per-step verdict list.
Returns Allowed when every step is allowed, FullyDenied when
every step is denied, and PartiallyDenied otherwise. An empty
plan is treated as Allowed by convention: the caller has
declared no work, so nothing can be forbidden.
Trait Implementations§
Source§impl Clone for PlanEvaluationResponse
impl Clone for PlanEvaluationResponse
Source§fn clone(&self) -> PlanEvaluationResponse
fn clone(&self) -> PlanEvaluationResponse
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PlanEvaluationResponse
impl Debug for PlanEvaluationResponse
Source§impl<'de> Deserialize<'de> for PlanEvaluationResponse
impl<'de> Deserialize<'de> for PlanEvaluationResponse
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PlanEvaluationResponse, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PlanEvaluationResponse, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for PlanEvaluationResponse
impl Serialize for PlanEvaluationResponse
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for PlanEvaluationResponse
impl RefUnwindSafe for PlanEvaluationResponse
impl Send for PlanEvaluationResponse
impl Sync for PlanEvaluationResponse
impl Unpin for PlanEvaluationResponse
impl UnsafeUnpin for PlanEvaluationResponse
impl UnwindSafe for PlanEvaluationResponse
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