pub enum LlamaTokenTypeFromIntError {
UnknownValue(llama_vocab_type),
}Expand description
Error that occurs when trying to convert a llama_vocab_type to a VocabType.
This error is raised when the integer value returned by the system does not correspond to a known vocabulary type.
§Variants
UnknownValue: The error is raised when the value is not a validllama_vocab_type. The invalid value is returned with the error.
§Example
use llama_cpp_4::model::LlamaTokenTypeFromIntError;
let invalid_value = 999; // Not a valid vocabulary type
let error = LlamaTokenTypeFromIntError::UnknownValue(invalid_value);
println!("Error: {}", error);Variants§
UnknownValue(llama_vocab_type)
The value is not a valid llama_token_type. Contains the int value that was invalid.
Trait Implementations§
Source§impl Debug for LlamaTokenTypeFromIntError
impl Debug for LlamaTokenTypeFromIntError
Source§impl Display for LlamaTokenTypeFromIntError
impl Display for LlamaTokenTypeFromIntError
Source§impl Error for LlamaTokenTypeFromIntError
impl Error for LlamaTokenTypeFromIntError
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()
impl Eq for LlamaTokenTypeFromIntError
impl StructuralPartialEq for LlamaTokenTypeFromIntError
Auto Trait Implementations§
impl Freeze for LlamaTokenTypeFromIntError
impl RefUnwindSafe for LlamaTokenTypeFromIntError
impl Send for LlamaTokenTypeFromIntError
impl Sync for LlamaTokenTypeFromIntError
impl Unpin for LlamaTokenTypeFromIntError
impl UnsafeUnpin for LlamaTokenTypeFromIntError
impl UnwindSafe for LlamaTokenTypeFromIntError
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