Trait trezor_client::transport::protocol::Protocol
source · pub trait Protocol {
// Required methods
fn session_begin(&mut self) -> Result<(), Error>;
fn session_end(&mut self) -> Result<(), Error>;
fn write(&mut self, message: ProtoMessage) -> Result<(), Error>;
fn read(&mut self) -> Result<ProtoMessage, Error>;
}
Expand description
A protocol is used to encode messages in chunks that can be sent to the device and to parse chunks into messages.