Trait ismp::module::IsmpModule

source ·
pub trait IsmpModule {
    // Required methods
    fn on_accept(&self, request: PostRequest) -> Result<(), Error>;
    fn on_response(&self, response: Response) -> Result<(), Error>;
    fn on_timeout(&self, request: Timeout) -> Result<(), Error>;
}
Expand description

Individual modules which live on a state machine must conform to this interface in order to send and receive ISMP requests and responses

Required Methods§

source

fn on_accept(&self, request: PostRequest) -> Result<(), Error>

Called by the message handler on a module, to notify module of a new POST request the module may choose to respond immediately, or in a later block

source

fn on_response(&self, response: Response) -> Result<(), Error>

Called by the message handler on a module, to notify module of a response to a previously sent out request

source

fn on_timeout(&self, request: Timeout) -> Result<(), Error>

Called by the message handler on a module, to notify module of requests that were previously sent but have now timed-out

Implementors§