pub type SharedWriter = Arc<Mutex<Box<dyn AsyncWrite + Unpin + Send>>>;Expand description
Trait-object writer reference the HostPipe holds when connected.
Arc<Mutex<Box<dyn AsyncWrite + Unpin + Send>>> so the same
physical write half is reachable both by HostPipe (event fanout +
saga command dispatch) AND by the IPC server’s per-connection
handler (connection-private error replies — Event::Error on parse
failures + register-first violations). The mutex serializes
writes so frames can’t interleave on the wire.
On set, HostPipe stores a clone of the same Arc the per-connection handler uses for its main loop. On clear, HostPipe drops its clone; the handler still has its own Arc so error replies (if any) keep working through the disconnect path.
Aliased Type§
pub struct SharedWriter { /* private fields */ }