pub enum WaitableDataChannelRequest {
Read {
responder: WaitableDataChannelReadResponder,
},
Write {
payload: WaitableDataChannelWriteRequest,
responder: WaitableDataChannelWriteResponder,
},
#[non_exhaustive] _UnknownMethod {
ordinal: u64,
control_handle: WaitableDataChannelControlHandle,
method_type: MethodType,
},
}Expand description
Provides a bound / connected session to a particular DataChannel. New connections should use the UnboundWaitableDataChannel to open a session of this procotol. Calls to Read() on a WaitableDataChannel will operate as a non-blocking operation. Callers will need to use the event exchanged in the Bind() call to flag when data is available to read
Variants§
Read
The call will return the next datagram to be read from the channel. If there is more data to be read, SIGNAL_READABLE will remain asserted after this call returns. If there is no data to be read, this call will return ZX_ERR_SHOULD_WAIT
Fields
responder: WaitableDataChannelReadResponderWrite
The call will return once the data is fully committed.
If the driver is not ready for a write, it will return ZX_ERR_NO_RESOURCES and the caller should await SIGNAL_WRITABLE to be asserted.
#[non_exhaustive]_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: WaitableDataChannelControlHandlemethod_type: MethodTypeImplementations§
Source§impl WaitableDataChannelRequest
impl WaitableDataChannelRequest
pub fn into_read(self) -> Option<WaitableDataChannelReadResponder>
pub fn into_write( self, ) -> Option<(WaitableDataChannelWriteRequest, WaitableDataChannelWriteResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL