Skip to main content

ActionTransport

Trait ActionTransport 

Source
pub trait ActionTransport {
    // Required method
    fn replicate(&mut self, env: &ActionEnvelope);

    // Provided method
    fn submit_to_host(&mut self, _env: &ActionEnvelope) -> HostDecision { ... }
}
Expand description

The transport an action is handed to after (or instead of) local execution — the boundary between the pure action model and whatever moves bytes (in-process broker, compositor socket, Iroh). The model never imports a transport, only calls this trait.

Required Methods§

Source

fn replicate(&mut self, env: &ActionEnvelope)

Replicate a locally-applied action to peers so they can replay it.

Provided Methods§

Source

fn submit_to_host(&mut self, _env: &ActionEnvelope) -> HostDecision

Submit a ServerPreferred action to a host for authoritative execution. Default is unavailable, so a local-only transport fails closed for host-authoritative actions.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§