#[non_exhaustive]pub enum TerminalReviewVerdict {
Approve,
Repair {
feedback: Value,
},
Reject {
reason: String,
},
}Expand description
Semantic decision returned by a terminal reviewer.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Approve
Commit the candidate as the Agent outcome.
Repair
Append bounded feedback and ask the original Agent to regenerate.
Reject
Permanently terminate without accepting or regenerating the candidate.
Implementations§
Source§impl TerminalReviewVerdict
impl TerminalReviewVerdict
Sourcepub fn repair(feedback: Value) -> Result<Self, TerminalReviewError>
pub fn repair(feedback: Value) -> Result<Self, TerminalReviewError>
Creates a validated repair verdict.
§Errors
Returns TerminalReviewError::InvalidVerdict when feedback is null
or its canonical JSON representation exceeds 64 KiB.
Sourcepub fn reject(reason: impl Into<String>) -> Result<Self, TerminalReviewError>
pub fn reject(reason: impl Into<String>) -> Result<Self, TerminalReviewError>
Creates a validated permanent rejection verdict.
§Errors
Returns TerminalReviewError::InvalidVerdict when the reason is
blank or exceeds 4 KiB.
Sourcepub fn validate(&self) -> Result<(), TerminalReviewError>
pub fn validate(&self) -> Result<(), TerminalReviewError>
Validates bounds and required fields before a verdict is acted upon.
§Errors
Returns TerminalReviewError::InvalidVerdict for invalid feedback or
rejection text.
Sourcepub const fn kind(&self) -> TerminalReviewVerdictKind
pub const fn kind(&self) -> TerminalReviewVerdictKind
Returns the stable verdict category.
Trait Implementations§
Source§impl Clone for TerminalReviewVerdict
impl Clone for TerminalReviewVerdict
Source§fn clone(&self) -> TerminalReviewVerdict
fn clone(&self) -> TerminalReviewVerdict
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 moreSource§impl Debug for TerminalReviewVerdict
impl Debug for TerminalReviewVerdict
Source§impl<'de> Deserialize<'de> for TerminalReviewVerdict
impl<'de> Deserialize<'de> for TerminalReviewVerdict
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 TerminalReviewVerdict
impl PartialEq for TerminalReviewVerdict
Source§impl Serialize for TerminalReviewVerdict
impl Serialize for TerminalReviewVerdict
impl StructuralPartialEq for TerminalReviewVerdict
Auto Trait Implementations§
impl Freeze for TerminalReviewVerdict
impl RefUnwindSafe for TerminalReviewVerdict
impl Send for TerminalReviewVerdict
impl Sync for TerminalReviewVerdict
impl Unpin for TerminalReviewVerdict
impl UnsafeUnpin for TerminalReviewVerdict
impl UnwindSafe for TerminalReviewVerdict
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