pub struct EncodedRequest {
pub input_ids: Vec<u32>,
pub questions: Vec<QuestionAnchors>,
}Expand description
One tokenized decision request: the ids fed to the backbone and the anchor map the shared scorer reads at.
Fields§
§input_ids: Vec<u32>Token ids of the canonical serialization (state header + question blocks).
questions: Vec<QuestionAnchors>Per-question anchor maps, in canonical (authoring) question order.
Implementations§
Source§impl EncodedRequest
impl EncodedRequest
Sourcepub fn token_count(&self) -> usize
pub fn token_count(&self) -> usize
The encoded length in tokens — the quantity the spec budget constrains.
Trait Implementations§
Source§impl Clone for EncodedRequest
impl Clone for EncodedRequest
Source§fn clone(&self) -> EncodedRequest
fn clone(&self) -> EncodedRequest
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 moreSource§impl Debug for EncodedRequest
impl Debug for EncodedRequest
Source§impl PartialEq for EncodedRequest
impl PartialEq for EncodedRequest
Source§fn eq(&self, other: &EncodedRequest) -> bool
fn eq(&self, other: &EncodedRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for EncodedRequest
impl StructuralPartialEq for EncodedRequest
Auto Trait Implementations§
impl Freeze for EncodedRequest
impl RefUnwindSafe for EncodedRequest
impl Send for EncodedRequest
impl Sync for EncodedRequest
impl Unpin for EncodedRequest
impl UnsafeUnpin for EncodedRequest
impl UnwindSafe for EncodedRequest
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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