Skip to main content

PdHandler

Trait PdHandler 

Source
pub trait PdHandler {
    // Required method
    fn on_command(&mut self, command: &Command) -> Reply;
}
Expand description

Trait for PD-side application logic. Each incoming command becomes a method call; the handler returns the reply to emit.

Required Methods§

Source

fn on_command(&mut self, command: &Command) -> Reply

Dispatch a fully-decoded command and return the reply payload.

Implementors§