tigrbl_rs_ports 0.4.1

Trait and envelope boundaries for Rust atoms, handlers, engines, and callbacks.
Documentation
1
2
3
4
5
6
7
use crate::errors::PortResult;
use tigrbl_rs_spec::{request::RequestEnvelope, response::ResponseEnvelope};

pub trait HandlerPort: Send + Sync {
    fn name(&self) -> &str;
    fn handle(&self, request: &RequestEnvelope) -> PortResult<ResponseEnvelope>;
}