pub struct SummarizeFailure {
pub usage: Option<GenerateContentResponseUsageMetadata>,
pub source: Box<dyn Error + Send + Sync>,
}Expand description
A summarization failure that still reports what it spent (the usage travels with the
error). Return it boxed from
Summarizer::summarize_events when a model call was paid for and failed; the framework
records the usage on the compaction span. Display and source() are the wrapped error’s.
Fields§
§usage: Option<GenerateContentResponseUsageMetadata>The token usage the failed attempt cost.
source: Box<dyn Error + Send + Sync>The failure.
Trait Implementations§
Source§impl Debug for SummarizeFailure
impl Debug for SummarizeFailure
Source§impl Display for SummarizeFailure
impl Display for SummarizeFailure
Source§impl Error for SummarizeFailure
impl Error for SummarizeFailure
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for SummarizeFailure
impl !UnwindSafe for SummarizeFailure
impl Forget for SummarizeFailure
impl Freeze for SummarizeFailure
impl Move for SummarizeFailure
impl Send for SummarizeFailure
impl Sync for SummarizeFailure
impl Unpin for SummarizeFailure
impl UnsafeUnpin for SummarizeFailure
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