pub enum ChannelRequest {
CreateChannel {
handles: [NewHandleId; 2],
responder: ChannelCreateChannelResponder,
},
ReadChannel {
handle: HandleId,
responder: ChannelReadChannelResponder,
},
WriteChannel {
handle: HandleId,
data: Vec<u8>,
handles: Handles,
responder: ChannelWriteChannelResponder,
},
ReadChannelStreamingStart {
handle: HandleId,
responder: ChannelReadChannelStreamingStartResponder,
},
ReadChannelStreamingStop {
handle: HandleId,
responder: ChannelReadChannelStreamingStopResponder,
},
#[non_exhaustive] _UnknownMethod {
ordinal: u64,
control_handle: ChannelControlHandle,
method_type: MethodType,
},
}Expand description
FDomain operations on Channels.
Variants§
CreateChannel
Create a new channel in this FDomain and return both its ends.
ReadChannel
Read a message from a channel. This method will fail if the channel is currently being read using the streaming read functions.
Note that this method is not like zx_channel_read in that it will not
return SHOULD_WAIT but will instead delay returning until there is data
to return.
WriteChannel
Write to a channel. Handles are always consumed.
ReadChannelStreamingStart
Starts reading from the given channel. Data is returned via the ChannelStreamingData event.
That event will occur repeatedly until ReadChannelStreamingStop is called for the same handle
or the event indicates the handle is closed.
ReadChannelStreamingStop
Stop asynchronous reading from the given channel.
#[non_exhaustive]_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: ChannelControlHandlemethod_type: MethodTypeImplementations§
Source§impl ChannelRequest
impl ChannelRequest
pub fn into_create_channel( self, ) -> Option<([NewHandleId; 2], ChannelCreateChannelResponder)>
pub fn into_read_channel( self, ) -> Option<(HandleId, ChannelReadChannelResponder)>
pub fn into_write_channel( self, ) -> Option<(HandleId, Vec<u8>, Handles, ChannelWriteChannelResponder)>
pub fn into_read_channel_streaming_start( self, ) -> Option<(HandleId, ChannelReadChannelStreamingStartResponder)>
pub fn into_read_channel_streaming_stop( self, ) -> Option<(HandleId, ChannelReadChannelStreamingStopResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL