pub struct NestedVMHandler { /* private fields */ }Expand description
Effect handler that dispatches to inner VMs keyed by outer role name.
Implementations§
Source§impl NestedVMHandler
impl NestedVMHandler
Sourcepub fn with_rounds_per_step(self, rounds: usize) -> Self
pub fn with_rounds_per_step(self, rounds: usize) -> Self
Set how many inner VM rounds to advance per outer handler call.
Sourcepub fn rounds_per_step(&self) -> usize
pub fn rounds_per_step(&self) -> usize
Number of inner VM rounds attempted per outer handler call.
Sourcepub fn add_site(
&mut self,
name: impl Into<String>,
vm: VM,
handler: Box<dyn EffectHandler>,
)
pub fn add_site( &mut self, name: impl Into<String>, vm: VM, handler: Box<dyn EffectHandler>, )
Register a site by name with its inner VM and handler.
Trait Implementations§
Source§impl Default for NestedVMHandler
impl Default for NestedVMHandler
Source§impl EffectHandler for NestedVMHandler
impl EffectHandler for NestedVMHandler
Source§fn handle_send(
&self,
role: &str,
_partner: &str,
_label: &str,
_state: &[Value],
) -> Result<Value, String>
fn handle_send( &self, role: &str, _partner: &str, _label: &str, _state: &[Value], ) -> Result<Value, String>
Compute the payload for a send instruction. Read more
Source§fn handle_recv(
&self,
role: &str,
_partner: &str,
_label: &str,
_state: &mut Vec<Value>,
_payload: &Value,
) -> Result<(), String>
fn handle_recv( &self, role: &str, _partner: &str, _label: &str, _state: &mut Vec<Value>, _payload: &Value, ) -> Result<(), String>
Process a received value. Read more
Source§fn handle_choose(
&self,
_role: &str,
_partner: &str,
labels: &[String],
_state: &[Value],
) -> Result<String, String>
fn handle_choose( &self, _role: &str, _partner: &str, labels: &[String], _state: &[Value], ) -> Result<String, String>
Choose which branch to take for internal choice (select). Read more
Source§fn step(&self, role: &str, _state: &mut Vec<Value>) -> Result<(), String>
fn step(&self, role: &str, _state: &mut Vec<Value>) -> Result<(), String>
Perform an integration step after a protocol round. Read more
Source§fn handler_identity(&self) -> String
fn handler_identity(&self) -> String
Stable identifier for effect-trace attribution.
Source§fn send_decision_fast_path(
&self,
_fast_path: SendDecisionFastPathInput<'_>,
_state: &[Value],
_payload: Option<&Value>,
) -> Option<Result<SendDecision, String>>
fn send_decision_fast_path( &self, _fast_path: SendDecisionFastPathInput<'_>, _state: &[Value], _payload: Option<&Value>, ) -> Option<Result<SendDecision, String>>
Optional fast-path hook for send decision dispatch. Read more
Source§fn send_decision(
&self,
input: SendDecisionInput<'_>,
) -> Result<SendDecision, String>
fn send_decision( &self, input: SendDecisionInput<'_>, ) -> Result<SendDecision, String>
Decide how to handle a send, optionally with a precomputed payload. Read more
Source§fn handle_acquire(
&self,
_sid: SessionId,
_role: &str,
_layer: &str,
_state: &[Value],
) -> Result<AcquireDecision, String>
fn handle_acquire( &self, _sid: SessionId, _role: &str, _layer: &str, _state: &[Value], ) -> Result<AcquireDecision, String>
Attempt to acquire a guard layer. Read more
Source§fn handle_release(
&self,
_sid: SessionId,
_role: &str,
_layer: &str,
_evidence: &Value,
_state: &[Value],
) -> Result<(), String>
fn handle_release( &self, _sid: SessionId, _role: &str, _layer: &str, _evidence: &Value, _state: &[Value], ) -> Result<(), String>
Release a guard layer using previously acquired evidence. Read more
Source§fn topology_events(
&self,
_tick: u64,
) -> Result<Vec<TopologyPerturbation>, String>
fn topology_events( &self, _tick: u64, ) -> Result<Vec<TopologyPerturbation>, String>
Topology perturbations injected by the environment for this scheduler tick. Read more
Source§fn output_condition_hint(
&self,
_sid: SessionId,
_role: &str,
_state: &[Value],
) -> Option<OutputConditionHint>
fn output_condition_hint( &self, _sid: SessionId, _role: &str, _state: &[Value], ) -> Option<OutputConditionHint>
Optional output-condition metadata for commit gating. Read more
Auto Trait Implementations§
impl Freeze for NestedVMHandler
impl !RefUnwindSafe for NestedVMHandler
impl Send for NestedVMHandler
impl Sync for NestedVMHandler
impl Unpin for NestedVMHandler
impl UnsafeUnpin for NestedVMHandler
impl !UnwindSafe for NestedVMHandler
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> StrictAs for T
impl<T> StrictAs for T
Source§fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
Casts the value.
Source§impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
Source§fn strict_cast_from(src: Src) -> Dst
fn strict_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.