pub trait FunctionCodeHandler: Send + Sync {
// Required methods
fn handle(&self, req: &FunctionCodeRequest) -> FunctionCodeResponse;
fn function_code(&self) -> u8;
fn description(&self) -> &str;
}Expand description
Trait for objects that can handle a specific Modbus function code.
Required Methods§
Sourcefn handle(&self, req: &FunctionCodeRequest) -> FunctionCodeResponse
fn handle(&self, req: &FunctionCodeRequest) -> FunctionCodeResponse
Process the request and return a response.
Sourcefn function_code(&self) -> u8
fn function_code(&self) -> u8
The Modbus function code byte this handler is responsible for.
Sourcefn description(&self) -> &str
fn description(&self) -> &str
Short textual description of what this handler does.