Trait fidl::endpoints::SynchronousProxy

source ·
pub trait SynchronousProxy: Sized + Send + Sync {
    type Proxy: Proxy<Protocol = Self::Protocol>;
    type Protocol: ProtocolMarker<Proxy = Self::Proxy>;

    // Required methods
    fn from_channel(inner: Channel) -> Self;
    fn into_channel(self) -> Channel;
    fn as_channel(&self) -> &Channel;

    // Provided method
    fn is_closed(&self) -> Result<bool, Status> { ... }
}
Expand description

A type which allows querying a remote FIDL server over a channel, blocking the calling thread.

Required Associated Types§

source

type Proxy: Proxy<Protocol = Self::Protocol>

The async proxy for the same protocol.

source

type Protocol: ProtocolMarker<Proxy = Self::Proxy>

The protocol which this Proxy controls.

Required Methods§

source

fn from_channel(inner: Channel) -> Self

Create a proxy over the given channel.

source

fn into_channel(self) -> Channel

Convert the proxy back into a channel.

source

fn as_channel(&self) -> &Channel

Get a reference to the proxy’s underlying channel.

This should only be used for non-effectful operations. Reading or writing to the channel is unsafe because the proxy assumes it has exclusive control over these operations.

Provided Methods§

source

fn is_closed(&self) -> Result<bool, Status>

Returns true if the proxy has received the PEER_CLOSED signal.

§Errors

See https://fuchsia.dev/reference/syscalls/object_wait_one?hl=en#errors for a full list of errors. Note that Status::TIMED_OUT errors are converted to Ok(false) and all other errors are propagated.

Object Safety§

This trait is not object safe.

Implementors§