pub struct GenerationFailure {
pub cause: GenerateError,
pub retryable: bool,
pub retry_after: Option<Duration>,
}Fields§
§cause: GenerateError§retryable: boolA transient cause. Retrying callers must discard the failed attempt’s provisional parts; only a validated response may execute tool calls.
retry_after: Option<Duration>Implementations§
Source§impl GenerationFailure
impl GenerationFailure
pub fn terminal(cause: GenerateError) -> Self
pub fn transient(cause: GenerateError, retry_after: Option<Duration>) -> Self
Trait Implementations§
Source§impl Clone for GenerationFailure
impl Clone for GenerationFailure
Source§fn clone(&self) -> GenerationFailure
fn clone(&self) -> GenerationFailure
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 GenerationFailure
impl Debug for GenerationFailure
Source§impl From<GenerateError> for GenerationFailure
impl From<GenerateError> for GenerationFailure
Source§fn from(cause: GenerateError) -> Self
fn from(cause: GenerateError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for GenerationFailure
impl RefUnwindSafe for GenerationFailure
impl Send for GenerationFailure
impl Sync for GenerationFailure
impl Unpin for GenerationFailure
impl UnsafeUnpin for GenerationFailure
impl UnwindSafe for GenerationFailure
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