#[non_exhaustive]pub enum ModelTokenLimitsError {
ZeroContext,
ZeroInput,
ZeroOutput,
InputExceedsContext {
input: TokenCount,
context: TokenCount,
},
OutputExceedsContext {
output: TokenCount,
context: TokenCount,
},
}Expand description
Invalid model token-limit snapshot.
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.
ZeroContext
A published total context ceiling was zero.
ZeroInput
A published input ceiling was zero.
ZeroOutput
A published output ceiling was zero.
InputExceedsContext
The independent input ceiling exceeded the total context ceiling.
OutputExceedsContext
The independent output ceiling exceeded the total context ceiling.
Trait Implementations§
Source§impl Clone for ModelTokenLimitsError
impl Clone for ModelTokenLimitsError
Source§impl Debug for ModelTokenLimitsError
impl Debug for ModelTokenLimitsError
Source§impl Display for ModelTokenLimitsError
impl Display for ModelTokenLimitsError
impl Eq for ModelTokenLimitsError
Source§impl Error for ModelTokenLimitsError
impl Error for ModelTokenLimitsError
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 ModelTokenLimitsError
impl PartialEq for ModelTokenLimitsError
impl StructuralPartialEq for ModelTokenLimitsError
Auto Trait Implementations§
impl Forget for ModelTokenLimitsError
impl Freeze for ModelTokenLimitsError
impl Move for ModelTokenLimitsError
impl RefUnwindSafe for ModelTokenLimitsError
impl Send for ModelTokenLimitsError
impl Sync for ModelTokenLimitsError
impl Unpin for ModelTokenLimitsError
impl UnsafeUnpin for ModelTokenLimitsError
impl UnwindSafe for ModelTokenLimitsError
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