pub enum DataChannelRequest {
Register {
event: Event,
responder: DataChannelRegisterResponder,
},
GetIdentifier {
responder: DataChannelGetIdentifierResponder,
},
Read {
payload: DataChannelReadRequest,
responder: DataChannelReadResponder,
},
Write {
payload: DataChannelWriteRequest,
responder: DataChannelWriteResponder,
},
#[non_exhaustive]
_UnknownMethod {
ordinal: u64,
control_handle: DataChannelControlHandle,
method_type: MethodType,
},
}
Variants§
Register
Set event used to signal device state. Discards existing event after having transferred device state to the new event. This must be called before invoking Read or Write, and can fail with ZX_ERR_NO_RESOURCES if the underlying channel is busy.
GetIdentifier
Returns the identifier associated with this connection.
Fields
§
responder: DataChannelGetIdentifierResponder
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.
Write
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.
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
control_handle: DataChannelControlHandle
§
method_type: MethodType
Implementations§
Source§impl DataChannelRequest
impl DataChannelRequest
pub fn into_register(self) -> Option<(Event, DataChannelRegisterResponder)>
pub fn into_get_identifier(self) -> Option<DataChannelGetIdentifierResponder>
pub fn into_read( self, ) -> Option<(DataChannelReadRequest, DataChannelReadResponder)>
pub fn into_write( self, ) -> Option<(DataChannelWriteRequest, DataChannelWriteResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DataChannelRequest
impl !RefUnwindSafe for DataChannelRequest
impl Send for DataChannelRequest
impl Sync for DataChannelRequest
impl Unpin for DataChannelRequest
impl !UnwindSafe for DataChannelRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more