#[repr(transparent)]pub struct Token(pub i32);
Expand description
A single token produced or consumed by a LlamaModel
, without its associated context.
Due to the layout of llama.cpp, these can be created from a LlamaModel
, but require a
LlamaSession
to decode.
On its own, this isn’t useful for anything other than being fed into
LlamaSession::advance_context_with_tokens
.
Tuple Fields§
§0: i32
Trait Implementations§
source§impl<'a> AsRef<Token> for CompletionToken<'a>
impl<'a> AsRef<Token> for CompletionToken<'a>
source§impl PartialEq for Token
impl PartialEq for Token
impl Copy for Token
impl Eq for Token
impl StructuralEq for Token
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
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