pub enum UsageError {
UnsafeInteger,
ReasoningExceedsOutput,
TotalOverflow,
}Expand description
Error returned when validating token usage.
Variants§
UnsafeInteger
A count exceeds JavaScript’s safe integer range.
ReasoningExceedsOutput
Reasoning tokens exceed output tokens.
TotalOverflow
Summing usage counts overflowed or exceeded the safe range.
Trait Implementations§
Source§impl Clone for UsageError
impl Clone for UsageError
Source§fn clone(&self) -> UsageError
fn clone(&self) -> UsageError
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 moreimpl Copy for UsageError
Source§impl Debug for UsageError
impl Debug for UsageError
Source§impl Display for UsageError
impl Display for UsageError
impl Eq for UsageError
Source§impl Error for UsageError
impl Error for UsageError
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 UsageError
impl PartialEq for UsageError
impl StructuralPartialEq for UsageError
Auto Trait Implementations§
impl Freeze for UsageError
impl RefUnwindSafe for UsageError
impl Send for UsageError
impl Sync for UsageError
impl Unpin for UsageError
impl UnsafeUnpin for UsageError
impl UnwindSafe for UsageError
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