pub trait RuntimePolicy:
Clone
+ Send
+ Sync
+ Serialize
+ DeserializeOwned
+ Debug
+ 'static {
// Required methods
fn version(&self) -> ContractVersion;
fn memory_capacity_bytes(&self) -> u64;
fn memory_reserve_bytes(&self) -> u64;
fn maximum_active_sequences(&self) -> u32;
fn maximum_scheduled_tokens(&self) -> u64;
fn attention_execution_policy(&self) -> AttentionExecutionPolicy;
fn execution_determinism_requirement(
&self,
) -> ExecutionDeterminismRequirement;
fn dynamic_storage_profile_order(&self) -> &[DynamicStorageProfile];
fn reusable_execution_policy(&self) -> Option<&ReusableExecutionPolicy>;
fn validate(&self) -> Result<(), VNextError>;
}Expand description
Typed policy selected before planning. Memory capacity is part of the public policy contract so a plan cannot depend on an undocumented env var.
Required Methods§
fn version(&self) -> ContractVersion
Sourcefn memory_capacity_bytes(&self) -> u64
fn memory_capacity_bytes(&self) -> u64
Policy memory ceiling before the explicit reserve is subtracted. It may be lower than, but never exceed, the raw device capacity.
fn memory_reserve_bytes(&self) -> u64
Sourcefn maximum_active_sequences(&self) -> u32
fn maximum_active_sequences(&self) -> u32
A non-zero protocol ceiling only. Planning must not reserve, claim, iterate, or materialize resources up to this value.
Sourcefn maximum_scheduled_tokens(&self) -> u64
fn maximum_scheduled_tokens(&self) -> u64
A non-zero ceiling for tokens selected into one scheduler step. This is not installed capacity: admission still evaluates the exact step shape against then-live backing before any provider work is encoded.
Sourcefn attention_execution_policy(&self) -> AttentionExecutionPolicy
fn attention_execution_policy(&self) -> AttentionExecutionPolicy
Provider-family policy sealed into the plan fingerprint. Physical kernel variants remain an invocation-time provider decision.
Sourcefn execution_determinism_requirement(&self) -> ExecutionDeterminismRequirement
fn execution_determinism_requirement(&self) -> ExecutionDeterminismRequirement
Minimum repeatability and reusable-execution equivalence that every selected operation provider must prove.
Sourcefn dynamic_storage_profile_order(&self) -> &[DynamicStorageProfile]
fn dynamic_storage_profile_order(&self) -> &[DynamicStorageProfile]
Ordered, non-empty allowlist used by planning after intersecting every selected provider requirement with the concrete runtime offers.
Sourcefn reusable_execution_policy(&self) -> Option<&ReusableExecutionPolicy>
fn reusable_execution_policy(&self) -> Option<&ReusableExecutionPolicy>
Optional reusable-execution capacity policy selected before planning. Core treats class identities as opaque and owns their memory derivation.
fn validate(&self) -> Result<(), VNextError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".