pub enum StateCapacityDemand {
FixedPerScope,
TokenScaled {
bytes_per_token: u64,
maximum_tokens: u64,
},
}Expand description
Backend-neutral capacity formula for semantic state. This deliberately says nothing about pages, blocks, allocator kind, or provider-visible regions. Concrete physical storage is selected only while building an execution plan from provider requirements, runtime offers, and typed policy.
Variants§
Implementations§
Source§impl StateCapacityDemand
impl StateCapacityDemand
pub fn validate(self, tensor_minimum_bytes: u64) -> Result<(), VNextError>
pub fn minimum_bytes(self, tensor_minimum_bytes: u64) -> Result<u64, VNextError>
pub fn theoretical_bytes( self, tensor_minimum_bytes: u64, ) -> Result<u64, VNextError>
Trait Implementations§
Source§impl Clone for StateCapacityDemand
impl Clone for StateCapacityDemand
Source§fn clone(&self) -> StateCapacityDemand
fn clone(&self) -> StateCapacityDemand
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 StateCapacityDemand
Source§impl Debug for StateCapacityDemand
impl Debug for StateCapacityDemand
Source§impl<'de> Deserialize<'de> for StateCapacityDemand
impl<'de> Deserialize<'de> for StateCapacityDemand
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
impl Eq for StateCapacityDemand
Source§impl PartialEq for StateCapacityDemand
impl PartialEq for StateCapacityDemand
Source§impl Serialize for StateCapacityDemand
impl Serialize for StateCapacityDemand
impl StructuralPartialEq for StateCapacityDemand
Auto Trait Implementations§
impl Freeze for StateCapacityDemand
impl RefUnwindSafe for StateCapacityDemand
impl Send for StateCapacityDemand
impl Sync for StateCapacityDemand
impl Unpin for StateCapacityDemand
impl UnsafeUnpin for StateCapacityDemand
impl UnwindSafe for StateCapacityDemand
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