pub struct PrefixMatch {
pub matched_len: usize,
pub kv_caches: Option<Vec<KvCache>>,
pub pending_logits: Option<Vec<f32>>,
}Expand description
What was found (or not) for an incoming token sequence.
Fields§
§matched_len: usizeHow many leading tokens matched a stored prefix (0 if none).
kv_caches: Option<Vec<KvCache>>Restored KV cache state covering exactly matched_len
positions, ready to continue from. None if matched_len == 0.
pending_logits: Option<Vec<f32>>Logits predicting the token at position matched_len, valid
only when matched_len > 0.
Auto Trait Implementations§
impl Freeze for PrefixMatch
impl RefUnwindSafe for PrefixMatch
impl Send for PrefixMatch
impl Sync for PrefixMatch
impl Unpin for PrefixMatch
impl UnsafeUnpin for PrefixMatch
impl UnwindSafe for PrefixMatch
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more