Skip to main content

ManagementConversation

Trait ManagementConversation 

Source
pub trait ManagementConversation {
    // Required methods
    fn next_request(
        &mut self,
        wait: Duration,
    ) -> Result<Option<InboundManagement>, String>;
    fn reply(
        &mut self,
        correlation: CorrelationId,
        reply: &DevReply,
    ) -> Result<(), String>;
    fn publish_status(&mut self, event: &DevStatusEvent) -> Result<(), String>;
}
Expand description

The conversation surface the adapter serves over — the real implementation wraps frame_conv::ConversationHandle; tests script it. Errors are rendered transport fates: any Err means the dev client’s connection is gone and the serve loop exits with it.

Required Methods§

Source

fn next_request( &mut self, wait: Duration, ) -> Result<Option<InboundManagement>, String>

Waits up to wait for the next inbound request; Ok(None) is the benign quiet tick.

§Errors

A typed connection fate, rendered.

Source

fn reply( &mut self, correlation: CorrelationId, reply: &DevReply, ) -> Result<(), String>

Publishes the exactly-one typed reply for correlation.

§Errors

A typed publish failure, rendered.

Source

fn publish_status(&mut self, event: &DevStatusEvent) -> Result<(), String>

Publishes one S2 status event.

§Errors

A typed publish failure, rendered.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§