pub struct PrefillCost {
pub new_blocks: usize,
pub new_tokens: usize,
pub cached_tokens: usize,
pub active_cached_tokens: usize,
}Expand description
Represents the cost of prefilling content in the cache
Fields§
§new_blocks: usize§new_tokens: usize§cached_tokens: usizeNumber of tokens already cached (prefix hit). isl = cached_tokens + new_tokens
active_cached_tokens: usizeSubset of cached_tokens backed by active blocks. Physical-capacity
admission discounts only these because inactive reuse is re-consumed.
Implementations§
Source§impl PrefillCost
impl PrefillCost
Trait Implementations§
Source§impl Clone for PrefillCost
impl Clone for PrefillCost
Source§fn clone(&self) -> PrefillCost
fn clone(&self) -> PrefillCost
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 PrefillCost
impl Debug for PrefillCost
Source§impl<'de> Deserialize<'de> for PrefillCost
impl<'de> Deserialize<'de> for PrefillCost
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PrefillCost
impl RefUnwindSafe for PrefillCost
impl Send for PrefillCost
impl Sync for PrefillCost
impl Unpin for PrefillCost
impl UnsafeUnpin for PrefillCost
impl UnwindSafe for PrefillCost
Blanket Implementations§
impl<T> BlockMetadata for T
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