Skip to main content

Handler

Trait Handler 

Source
pub trait Handler: HandlerInCtx<()> {
    // Provided method
    fn handle(&self, command: &[u8], response: &mut [u8]) -> Result { ... }
}
Expand description

An handler to handle an APDU command and receive a response

Provided Methods§

Source

fn handle(&self, command: &[u8], response: &mut [u8]) -> Result

Handles the APDU command. Implementations must transmit the command to the card through a reader, then receive the response from them, returning length of the data written.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§