pub enum Eagle3SessionError {
Show 14 variants
Init,
Process,
Begin,
Draft,
Accept,
PromptTooLong {
size: usize,
maximum: usize,
},
IncompatibleContexts(&'static str),
BadSeqId {
seq_id: i32,
n_seq: u32,
},
InvalidConfig(&'static str),
Decode(DecodeError),
ProposalPending {
seq_id: i32,
},
NoPendingProposal {
seq_id: i32,
},
AcceptedTooMany {
accepted: u16,
proposed: usize,
},
State(SpeculativeStateError),
}Expand description
Errors raised by the EAGLE-3 draft session.
Variants§
Init
Returned when session init fails. The most common cause is that draft
was not built from a valid EAGLE-3 draft model (upstream expects a draft
model exposing exactly 3 target-extract layers), or that one of the
contexts is incompatible.
Process
process returned false on the underlying speculative context.
Begin
Native prompt initialization failed or raised a contained exception.
Draft
Native draft generation failed or raised a contained exception.
Accept
Native proposal acceptance failed or raised a contained exception.
PromptTooLong
Prompt storage exceeds the safe speculative-session bound.
Fields
IncompatibleContexts(&'static str)
The supplied contexts do not satisfy the native EAGLE-3 contract.
BadSeqId
Caller passed a sequence id outside [0, n_seq).
InvalidConfig(&'static str)
Invalid session configuration (e.g. n_draft_max <= 0).
Decode(DecodeError)
The target context failed to decode.
ProposalPending
An operation requires all draft proposals to be completed first.
NoPendingProposal
accept was called without a preceding nonempty draft.
AcceptedTooMany
The accepted prefix exceeds the proposal length.
State(SpeculativeStateError)
Exact speculative-state capture or restore failed.
Trait Implementations§
Source§impl Debug for Eagle3SessionError
impl Debug for Eagle3SessionError
Source§impl Display for Eagle3SessionError
impl Display for Eagle3SessionError
Source§impl Error for Eagle3SessionError
impl Error for Eagle3SessionError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()