pub struct DataChannelSynchronousProxy { /* private fields */ }
Implementations§
Source§impl DataChannelSynchronousProxy
impl DataChannelSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<DataChannelEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<DataChannelEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn register(
&self,
event: Event,
___deadline: MonotonicInstant,
) -> Result<DataChannelRegisterResult, Error>
pub fn register( &self, event: Event, ___deadline: MonotonicInstant, ) -> Result<DataChannelRegisterResult, Error>
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.
Sourcepub fn get_identifier(
&self,
___deadline: MonotonicInstant,
) -> Result<DataChannelGetIdentifierResponse, Error>
pub fn get_identifier( &self, ___deadline: MonotonicInstant, ) -> Result<DataChannelGetIdentifierResponse, Error>
Returns the identifier associated with this connection.
Sourcepub fn read(
&self,
payload: &DataChannelReadRequest,
___deadline: MonotonicInstant,
) -> Result<DataChannelReadResult, Error>
pub fn read( &self, payload: &DataChannelReadRequest, ___deadline: MonotonicInstant, ) -> Result<DataChannelReadResult, Error>
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.
Sourcepub fn write(
&self,
payload: &DataChannelWriteRequest,
___deadline: MonotonicInstant,
) -> Result<DataChannelWriteResult, Error>
pub fn write( &self, payload: &DataChannelWriteRequest, ___deadline: MonotonicInstant, ) -> Result<DataChannelWriteResult, Error>
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.
Trait Implementations§
Source§impl Debug for DataChannelSynchronousProxy
impl Debug for DataChannelSynchronousProxy
Source§impl From<Channel> for DataChannelSynchronousProxy
impl From<Channel> for DataChannelSynchronousProxy
Source§impl From<DataChannelSynchronousProxy> for Handle
impl From<DataChannelSynchronousProxy> for Handle
Source§fn from(value: DataChannelSynchronousProxy) -> Self
fn from(value: DataChannelSynchronousProxy) -> Self
Source§impl FromClient for DataChannelSynchronousProxy
impl FromClient for DataChannelSynchronousProxy
Source§type Protocol = DataChannelMarker
type Protocol = DataChannelMarker
Source§fn from_client(value: ClientEnd<DataChannelMarker>) -> Self
fn from_client(value: ClientEnd<DataChannelMarker>) -> Self
Source§impl SynchronousProxy for DataChannelSynchronousProxy
impl SynchronousProxy for DataChannelSynchronousProxy
Source§type Proxy = DataChannelProxy
type Proxy = DataChannelProxy
Source§type Protocol = DataChannelMarker
type Protocol = DataChannelMarker
Proxy
controls.