pub trait DeviceServerHandler<___T = Channel>where
___T: Transport,{
// Required methods
fn transfer(
&mut self,
request: Request<Transfer, ___T>,
responder: Responder<Transfer, ___T>,
) -> impl Future<Output = ()> + Send;
fn get_name(
&mut self,
responder: Responder<GetName, ___T>,
) -> impl Future<Output = ()> + Send;
}Expand description
A server handler for the Device protocol.
See Device for more details.
Required Methods§
Sourcefn transfer(
&mut self,
request: Request<Transfer, ___T>,
responder: Responder<Transfer, ___T>,
) -> impl Future<Output = ()> + Send
fn transfer( &mut self, request: Request<Transfer, ___T>, responder: Responder<Transfer, ___T>, ) -> impl Future<Output = ()> + Send
Issue one or more transactions to a particular I2C device.
Each Transaction is performed in the order in which it appears in transactions. Data for
read transfers (if there are any) is returned through read_data, which has one entry for
each read transfer in transactions. Transaction processing continues until all transfers
have been completed, an error occurs, or the target issues a NACK in response to a write
transfer.
The possible error values are:
ZX_ERR_INVALID_ARGS: transactions has zero elements, data_transfer was not specified
for a Transaction, or there was a zero-length DataTransfer.
ZX_ERR_OUT_OF_RANGE: A DataTransfer was too large to be handled by this I2C controller.
ZX_ERR_IO_NOT_PRESENT: The device did not respond to its I2C address.
ZX_ERR_IO_REFUSED: The device issued a NACK before the end of a write transfer.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.