pub enum DecodeError {
TensorCallback(TensorCallbackFailure),
NoKvCacheSlot,
NTokensZero,
VetoedByDecodeHook,
Unknown(c_int),
}Expand description
Failed to decode a batch.
Variants§
TensorCallback(TensorCallbackFailure)
A Rust tensor callback failed or unwound after native execution began.
NoKvCacheSlot
No kv cache slot was available.
NTokensZero
The number of tokens in the batch was 0.
VetoedByDecodeHook
A decode lifecycle hook vetoed the decode (native returned -4). The
specific cause is normally surfaced via DecodeError::TensorCallback;
this is the fallback when no Rust-side failure was recorded.
Unknown(c_int)
An unknown error occurred.
Trait Implementations§
Source§impl Debug for DecodeError
impl Debug for DecodeError
Source§impl Display for DecodeError
impl Display for DecodeError
impl Eq for DecodeError
Source§impl Error for DecodeError
impl Error for DecodeError
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 From<DecodeError> for Eagle3SessionError
impl From<DecodeError> for Eagle3SessionError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<DecodeError> for MtpSessionError
impl From<DecodeError> for MtpSessionError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<DecodeError> for LLamaCppError
impl From<DecodeError> for LLamaCppError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<NonZero<i32>> for DecodeError
Decode a error from llama.cpp into a DecodeError.
impl From<NonZero<i32>> for DecodeError
Decode a error from llama.cpp into a DecodeError.
Source§fn from(value: NonZeroI32) -> Self
fn from(value: NonZeroI32) -> Self
Converts to this type from the input type.
Source§impl From<TensorCallbackFailure> for DecodeError
impl From<TensorCallbackFailure> for DecodeError
Source§fn from(source: TensorCallbackFailure) -> Self
fn from(source: TensorCallbackFailure) -> Self
Converts to this type from the input type.
Source§impl PartialEq for DecodeError
impl PartialEq for DecodeError
impl StructuralPartialEq for DecodeError
Auto Trait Implementations§
impl Freeze for DecodeError
impl RefUnwindSafe for DecodeError
impl Send for DecodeError
impl Sync for DecodeError
impl Unpin for DecodeError
impl UnsafeUnpin for DecodeError
impl UnwindSafe for DecodeError
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