pub struct FDomainSynchronousProxy { /* private fields */ }Implementations§
Source§impl FDomainSynchronousProxy
impl FDomainSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<FDomainEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<FDomainEvent, 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 create_channel(
&self,
handles: &[NewHandleId; 2],
___deadline: MonotonicInstant,
) -> Result<ChannelCreateChannelResult, Error>
pub fn create_channel( &self, handles: &[NewHandleId; 2], ___deadline: MonotonicInstant, ) -> Result<ChannelCreateChannelResult, Error>
Create a new channel in this FDomain and return both its ends.
Sourcepub fn read_channel(
&self,
handle: &HandleId,
___deadline: MonotonicInstant,
) -> Result<ChannelReadChannelResult, Error>
pub fn read_channel( &self, handle: &HandleId, ___deadline: MonotonicInstant, ) -> Result<ChannelReadChannelResult, Error>
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.
Sourcepub fn write_channel(
&self,
handle: &HandleId,
data: &[u8],
handles: &Handles,
___deadline: MonotonicInstant,
) -> Result<ChannelWriteChannelResult, Error>
pub fn write_channel( &self, handle: &HandleId, data: &[u8], handles: &Handles, ___deadline: MonotonicInstant, ) -> Result<ChannelWriteChannelResult, Error>
Write to a channel. Handles are always consumed.
Sourcepub fn read_channel_streaming_start(
&self,
handle: &HandleId,
___deadline: MonotonicInstant,
) -> Result<ChannelReadChannelStreamingStartResult, Error>
pub fn read_channel_streaming_start( &self, handle: &HandleId, ___deadline: MonotonicInstant, ) -> Result<ChannelReadChannelStreamingStartResult, Error>
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.
Sourcepub fn read_channel_streaming_stop(
&self,
handle: &HandleId,
___deadline: MonotonicInstant,
) -> Result<ChannelReadChannelStreamingStopResult, Error>
pub fn read_channel_streaming_stop( &self, handle: &HandleId, ___deadline: MonotonicInstant, ) -> Result<ChannelReadChannelStreamingStopResult, Error>
Stop asynchronous reading from the given channel.
Sourcepub fn create_event(
&self,
handle: &NewHandleId,
___deadline: MonotonicInstant,
) -> Result<EventCreateEventResult, Error>
pub fn create_event( &self, handle: &NewHandleId, ___deadline: MonotonicInstant, ) -> Result<EventCreateEventResult, Error>
Create a new event in this FDomain and return it.
Sourcepub fn create_event_pair(
&self,
handles: &[NewHandleId; 2],
___deadline: MonotonicInstant,
) -> Result<EventPairCreateEventPairResult, Error>
pub fn create_event_pair( &self, handles: &[NewHandleId; 2], ___deadline: MonotonicInstant, ) -> Result<EventPairCreateEventPairResult, Error>
Create a new event pair in this FDomain and return both its ends.
Sourcepub fn create_socket(
&self,
options: SocketType,
handles: &[NewHandleId; 2],
___deadline: MonotonicInstant,
) -> Result<SocketCreateSocketResult, Error>
pub fn create_socket( &self, options: SocketType, handles: &[NewHandleId; 2], ___deadline: MonotonicInstant, ) -> Result<SocketCreateSocketResult, Error>
Create a new socket in this FDomain and return both its ends.
Sourcepub fn set_socket_disposition(
&self,
handle: &HandleId,
disposition: SocketDisposition,
disposition_peer: SocketDisposition,
___deadline: MonotonicInstant,
) -> Result<SocketSetSocketDispositionResult, Error>
pub fn set_socket_disposition( &self, handle: &HandleId, disposition: SocketDisposition, disposition_peer: SocketDisposition, ___deadline: MonotonicInstant, ) -> Result<SocketSetSocketDispositionResult, Error>
Set the disposition of a given socket.
Sourcepub fn read_socket(
&self,
handle: &HandleId,
max_bytes: u64,
___deadline: MonotonicInstant,
) -> Result<SocketReadSocketResult, Error>
pub fn read_socket( &self, handle: &HandleId, max_bytes: u64, ___deadline: MonotonicInstant, ) -> Result<SocketReadSocketResult, Error>
Read data from a socket. This method will fail if the socket is currently being read asynchronously.
Sourcepub fn write_socket(
&self,
handle: &HandleId,
data: &[u8],
___deadline: MonotonicInstant,
) -> Result<SocketWriteSocketResult, Error>
pub fn write_socket( &self, handle: &HandleId, data: &[u8], ___deadline: MonotonicInstant, ) -> Result<SocketWriteSocketResult, Error>
Write to a socket. This will attempt to write all the data passed, and
will block and retry whenever it is safe (e.g. it should never return
SHOULD_WAIT). The WriteSocketError contains a wrote parameter to
indicate if some bytes were written successfully before the failure
occurred.
Sourcepub fn read_socket_streaming_start(
&self,
handle: &HandleId,
___deadline: MonotonicInstant,
) -> Result<SocketReadSocketStreamingStartResult, Error>
pub fn read_socket_streaming_start( &self, handle: &HandleId, ___deadline: MonotonicInstant, ) -> Result<SocketReadSocketStreamingStartResult, Error>
Starts reading from the given socket. Data is returned via the SocketStreamingData event. That
event will occur repeatedly until ReadSocketStreamingStop is called for the same handle or the
event indicates the handle is closed.
Sourcepub fn read_socket_streaming_stop(
&self,
handle: &HandleId,
___deadline: MonotonicInstant,
) -> Result<SocketReadSocketStreamingStopResult, Error>
pub fn read_socket_streaming_stop( &self, handle: &HandleId, ___deadline: MonotonicInstant, ) -> Result<SocketReadSocketStreamingStopResult, Error>
Stop asynchronous reading from the given socket.
Sourcepub fn get_namespace(
&self,
new_handle: &NewHandleId,
___deadline: MonotonicInstant,
) -> Result<FDomainGetNamespaceResult, Error>
pub fn get_namespace( &self, new_handle: &NewHandleId, ___deadline: MonotonicInstant, ) -> Result<FDomainGetNamespaceResult, Error>
Adds a new channel handle to this namespace which points to a fuchsia.io.Directory. Can be used to “bootstrap” the FDomain.
Sourcepub fn close(
&self,
handles: &[HandleId],
___deadline: MonotonicInstant,
) -> Result<FDomainCloseResult, Error>
pub fn close( &self, handles: &[HandleId], ___deadline: MonotonicInstant, ) -> Result<FDomainCloseResult, Error>
Close one or more handles.
Sourcepub fn duplicate(
&self,
handle: &HandleId,
new_handle: &NewHandleId,
rights: Rights,
___deadline: MonotonicInstant,
) -> Result<FDomainDuplicateResult, Error>
pub fn duplicate( &self, handle: &HandleId, new_handle: &NewHandleId, rights: Rights, ___deadline: MonotonicInstant, ) -> Result<FDomainDuplicateResult, Error>
Duplicate a handle.
Sourcepub fn replace(
&self,
handle: &HandleId,
new_handle: &NewHandleId,
rights: Rights,
___deadline: MonotonicInstant,
) -> Result<FDomainReplaceResult, Error>
pub fn replace( &self, handle: &HandleId, new_handle: &NewHandleId, rights: Rights, ___deadline: MonotonicInstant, ) -> Result<FDomainReplaceResult, Error>
Close a handle and replace it with a new one with possibly different rights.
Sourcepub fn signal(
&self,
handle: &HandleId,
set: u32,
clear: u32,
___deadline: MonotonicInstant,
) -> Result<FDomainSignalResult, Error>
pub fn signal( &self, handle: &HandleId, set: u32, clear: u32, ___deadline: MonotonicInstant, ) -> Result<FDomainSignalResult, Error>
Set or clear signals on a handle.
Sourcepub fn signal_peer(
&self,
handle: &HandleId,
set: u32,
clear: u32,
___deadline: MonotonicInstant,
) -> Result<FDomainSignalPeerResult, Error>
pub fn signal_peer( &self, handle: &HandleId, set: u32, clear: u32, ___deadline: MonotonicInstant, ) -> Result<FDomainSignalPeerResult, Error>
Set or clear signals on a handle’s peer.
Sourcepub fn wait_for_signals(
&self,
handle: &HandleId,
signals: u32,
___deadline: MonotonicInstant,
) -> Result<FDomainWaitForSignalsResult, Error>
pub fn wait_for_signals( &self, handle: &HandleId, signals: u32, ___deadline: MonotonicInstant, ) -> Result<FDomainWaitForSignalsResult, Error>
Wait for signals from the given handle. Reply will be returned when one of the given signals is asserted.
Sourcepub fn get_koid(
&self,
handle: &HandleId,
___deadline: MonotonicInstant,
) -> Result<FDomainGetKoidResult, Error>
pub fn get_koid( &self, handle: &HandleId, ___deadline: MonotonicInstant, ) -> Result<FDomainGetKoidResult, Error>
Return the kernel object ID (koid) of the handle.
Trait Implementations§
Source§impl Debug for FDomainSynchronousProxy
impl Debug for FDomainSynchronousProxy
Source§impl From<Channel> for FDomainSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for FDomainSynchronousProxy
Source§impl From<FDomainSynchronousProxy> for NullableHandle
Available on Fuchsia only.
impl From<FDomainSynchronousProxy> for NullableHandle
Source§fn from(value: FDomainSynchronousProxy) -> Self
fn from(value: FDomainSynchronousProxy) -> Self
Source§impl FromClient for FDomainSynchronousProxy
Available on Fuchsia only.
impl FromClient for FDomainSynchronousProxy
Source§type Protocol = FDomainMarker
type Protocol = FDomainMarker
Source§fn from_client(value: ClientEnd<FDomainMarker>) -> Self
fn from_client(value: ClientEnd<FDomainMarker>) -> Self
Source§impl SynchronousProxy for FDomainSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for FDomainSynchronousProxy
Source§type Proxy = FDomainProxy
type Proxy = FDomainProxy
Source§type Protocol = FDomainMarker
type Protocol = FDomainMarker
Proxy controls.