pub struct InstanceConfig {
pub default_caps: CapabilityMask,
pub max_entities: u32,
pub max_scheduled: u32,
pub max_inbox_per_route: u32,
pub memory_budget_bytes: u64,
pub parent: Option<InstanceId>,
pub quota_reduction: QuotaReductionPolicy,
}Expand description
Per-instance configuration supplied at Kernel::create_instance.
All fields are pub — InstanceConfig { field: ..., ..Default::default() }
is the idiomatic construction pattern.
Fields§
§default_caps: CapabilityMaskThe instance’s capability grant — the upper bound on the authority
any action running against this instance can hold. effective_caps
resolves a System action to exactly this, and an External action
to this intersected with the submission/scheduling ceiling, so no
action can exceed what the instance config permits (there is no
Principal::System blanket bypass).
max_entities: u32Hard upper bound on entities (0 = unlimited).
max_scheduled: u32Hard upper bound on scheduled actions (0 = unlimited).
max_inbox_per_route: u32Per-route inbound-signal queue depth (0 = unlimited). A SendSignal
whose target route inbox is at this depth is dropped with
KernelEvent::SignalDropped { reason: QueueFull } and credits no
in-flight refcount.
memory_budget_bytes: u64Component byte ceiling enforced per-Op in step().
0 = unlimited (default). When > 0, an Op whose projected
post-commit total exceeds this is denied per-Op (EffectFailed)
without rolling back sibling Ops.
parent: Option<InstanceId>Parent InstanceId for hierarchical quota enforcement
(apply_quota_reduction); None for root instances.
quota_reduction: QuotaReductionPolicyPolicy applied when a parent’s quota would drop below current
child aggregate usage. See QuotaReductionPolicy.
Trait Implementations§
Source§impl Clone for InstanceConfig
impl Clone for InstanceConfig
Source§fn clone(&self) -> InstanceConfig
fn clone(&self) -> InstanceConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InstanceConfig
impl Debug for InstanceConfig
Source§impl Default for InstanceConfig
impl Default for InstanceConfig
Source§fn default() -> InstanceConfig
fn default() -> InstanceConfig
Source§impl<'de> Deserialize<'de> for InstanceConfig
impl<'de> Deserialize<'de> for InstanceConfig
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>,
impl Eq for InstanceConfig
Source§impl PartialEq for InstanceConfig
impl PartialEq for InstanceConfig
Source§fn eq(&self, other: &InstanceConfig) -> bool
fn eq(&self, other: &InstanceConfig) -> bool
self and other values to be equal, and is used by ==.