pub enum UsbAdbImpl_Request {
QueueTx {
data: Vec<u8>,
responder: UsbAdbImpl_QueueTxResponder,
},
Receive {
responder: UsbAdbImpl_ReceiveResponder,
},
}Expand description
USB ADB implementation protocol. The USB ADB driver would start serving this interface on the server endpoint passed to a driver during Device::Start.
Variants§
QueueTx
Request transmission of the packet in |data|.
Return status indicates transmission result: ZX_OK: Packet has been transmitted over USB to the host. ZX_ERR_INVALID_ARGS: |data| is empty. ZX_ERR_BAD_STATE: USB ADB device is not in an online or waiting state (e.g. stopping). ZX_ERR_IO: Low-level transport error submitting request to the USB endpoint. ZX_ERR_CANCELED: Transmission was canceled prior to completion (e.g. driver reset or teardown).
Receive
Request to receive data. This method ensures flow control by allowing the client to queue |Receive| requests proactively. The driver will complete the requests only when data is available.
Return data or error. ZX_OK: Success. data is valid. ZX_ERR_BAD_STATE: Subsequent requests will not succeed as well. Other error codes are from underlying subsystem and the caller should retry |Receive| in that case.
Fields
responder: UsbAdbImpl_ReceiveResponderImplementations§
Source§impl UsbAdbImpl_Request
impl UsbAdbImpl_Request
pub fn into_queue_tx(self) -> Option<(Vec<u8>, UsbAdbImpl_QueueTxResponder)>
pub fn into_receive(self) -> Option<UsbAdbImpl_ReceiveResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL