pub trait SendData {
    type Response;

    // Required methods
    fn get_data(&self) -> &[u8] ;
    fn data_sent(&mut self) -> &mut dyn ReceiveData<Response = Self::Response>;
}
Expand description

SendData holds data that should be transmitted to the nodes.

Call data_sent() after the data has been successfully transmitted in order to transition to the “receive response” state. If data transmission fails this struct should be dropped in order to return to the idle state.

Required Associated Types§

source

type Response

The type of the value of the response to the query

Required Methods§

source

fn get_data(&self) -> &[u8]

Returns the data that is to be sent on the bus to the nodes.

source

fn data_sent(&mut self) -> &mut dyn ReceiveData<Response = Self::Response>

Call when the data has been sent successfully and it is time to receive the response.

Implementors§