pub enum GovernanceRefusal {
Park,
Fail,
}Expand description
What a DurableWorker does with a run its governance control refuses after the run
made a model or tool call (spec 3.2 §10 S3).
§Example
use adk_server::background::{DurableWorkerConfig, GovernanceRefusal};
let config = DurableWorkerConfig::default();
assert_eq!(config.on_governance_refusal, GovernanceRefusal::Park);
let config = config.with_governance_refusal(GovernanceRefusal::Fail);
assert_eq!(config.on_governance_refusal, GovernanceRefusal::Fail);Variants§
Park
Park the run Waiting on its Session checkpoint at its next model-call boundary,
reported as ParkReason::Frozen, and wake it when the control allows work again.
See Freeze parks. The default.
Fail
End the attempt with the control’s error: governance.frozen fails the run,
governance.stale requeues it while attempts remain.
Trait Implementations§
Source§impl Clone for GovernanceRefusal
impl Clone for GovernanceRefusal
impl Copy for GovernanceRefusal
Source§impl Debug for GovernanceRefusal
impl Debug for GovernanceRefusal
Source§impl Default for GovernanceRefusal
impl Default for GovernanceRefusal
impl Eq for GovernanceRefusal
Source§impl Hash for GovernanceRefusal
impl Hash for GovernanceRefusal
Source§impl PartialEq for GovernanceRefusal
impl PartialEq for GovernanceRefusal
impl StructuralPartialEq for GovernanceRefusal
Auto Trait Implementations§
impl Forget for GovernanceRefusal
impl Freeze for GovernanceRefusal
impl Move for GovernanceRefusal
impl RefUnwindSafe for GovernanceRefusal
impl Send for GovernanceRefusal
impl Sync for GovernanceRefusal
impl Unpin for GovernanceRefusal
impl UnsafeUnpin for GovernanceRefusal
impl UnwindSafe for GovernanceRefusal
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 more