pub enum VerifyPredicate {
Natural(String),
Expression(String),
}Expand description
A verification criterion attached to a task node.
The planner populates this from the verify_criteria field in its JSON output.
Only Natural is constructible in v1. If the planner emits Expression, the
scheduler returns OrchestrationError::PredicateNotSupported rather than
silently ignoring the criterion.
§Examples
use zeph_orchestration::VerifyPredicate;
let pred = VerifyPredicate::Natural("output must contain a valid JSON object".to_string());
assert!(matches!(pred, VerifyPredicate::Natural(_)));Variants§
Natural(String)
Free-form natural-language criterion evaluated by the LLM judge.
Expression(String)
Symbolic expression (reserved, not supported in v1).
Implementations§
Source§impl VerifyPredicate
impl VerifyPredicate
Sourcepub fn as_natural(&self) -> Result<&str, OrchestrationError>
pub fn as_natural(&self) -> Result<&str, OrchestrationError>
Returns Ok(&criterion) for Natural predicates; Err(PredicateNotSupported)
for unsupported variants.
§Errors
Returns OrchestrationError::PredicateNotSupported when the variant is not
evaluatable in the current version.
Trait Implementations§
Source§impl Clone for VerifyPredicate
impl Clone for VerifyPredicate
Source§fn clone(&self) -> VerifyPredicate
fn clone(&self) -> VerifyPredicate
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 VerifyPredicate
impl Debug for VerifyPredicate
Source§impl<'de> Deserialize<'de> for VerifyPredicate
impl<'de> Deserialize<'de> for VerifyPredicate
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
Source§impl PartialEq for VerifyPredicate
impl PartialEq for VerifyPredicate
Source§impl Serialize for VerifyPredicate
impl Serialize for VerifyPredicate
impl Eq for VerifyPredicate
impl StructuralPartialEq for VerifyPredicate
Auto Trait Implementations§
impl Freeze for VerifyPredicate
impl RefUnwindSafe for VerifyPredicate
impl Send for VerifyPredicate
impl Sync for VerifyPredicate
impl Unpin for VerifyPredicate
impl UnsafeUnpin for VerifyPredicate
impl UnwindSafe for VerifyPredicate
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<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.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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> 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 moreSource§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>
Wrap the input message
T in a tonic::Request