#[non_exhaustive]pub enum AccumulateError {
UnexpectedEvent {
got: String,
},
BlockKindMismatch {
index: usize,
expected: &'static str,
actual: &'static str,
},
}Expand description
Errors produced while accumulating provider-specific streaming deltas.
#[non_exhaustive]: more variants may be added as further ordering or
validation checks are introduced, without it being a breaking change.
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.
UnexpectedEvent
An event arrived in an order the state machine does not allow
(for example an Anthropic content_block_delta before content_block_start,
a block event before message_start, or any block event after message_stop).
BlockKindMismatch
A delta targeted a content block whose kind does not match the delta
(for example a text_delta applied to a tool_use block).
Trait Implementations§
Source§impl Clone for AccumulateError
impl Clone for AccumulateError
Source§fn clone(&self) -> AccumulateError
fn clone(&self) -> AccumulateError
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 AccumulateError
impl Debug for AccumulateError
Source§impl Display for AccumulateError
impl Display for AccumulateError
impl Eq for AccumulateError
Source§impl Error for AccumulateError
Available on crate feature std only.
impl Error for AccumulateError
Available on crate feature
std only.1.30.0 · 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()
Source§impl PartialEq for AccumulateError
impl PartialEq for AccumulateError
Source§fn eq(&self, other: &AccumulateError) -> bool
fn eq(&self, other: &AccumulateError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AccumulateError
Auto Trait Implementations§
impl Freeze for AccumulateError
impl RefUnwindSafe for AccumulateError
impl Send for AccumulateError
impl Sync for AccumulateError
impl Unpin for AccumulateError
impl UnsafeUnpin for AccumulateError
impl UnwindSafe for AccumulateError
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