pub struct PrefillChunk { /* private fields */ }Expand description
Exact, validated prompt progress assigned to one prefill invocation.
Implementations§
Source§impl PrefillChunk
impl PrefillChunk
pub fn new( tokens_processed: usize, tokens_to_process: usize, total_prompt_tokens: usize, ) -> Result<Self>
pub const fn tokens_processed(self) -> usize
pub const fn tokens_to_process(self) -> usize
pub const fn total_prompt_tokens(self) -> usize
pub fn range(self) -> Range<usize> ⓘ
pub const fn end(self) -> usize
pub const fn is_final(self) -> bool
Trait Implementations§
Source§impl Clone for PrefillChunk
impl Clone for PrefillChunk
Source§fn clone(&self) -> PrefillChunk
fn clone(&self) -> PrefillChunk
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 PrefillChunk
Source§impl Debug for PrefillChunk
impl Debug for PrefillChunk
impl Eq for PrefillChunk
Source§impl PartialEq for PrefillChunk
impl PartialEq for PrefillChunk
Source§impl Serialize for PrefillChunk
impl Serialize for PrefillChunk
impl StructuralPartialEq for PrefillChunk
Auto Trait Implementations§
impl Freeze for PrefillChunk
impl RefUnwindSafe for PrefillChunk
impl Send for PrefillChunk
impl Sync for PrefillChunk
impl Unpin for PrefillChunk
impl UnsafeUnpin for PrefillChunk
impl UnwindSafe for PrefillChunk
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