pub struct Client { /* private fields */ }
Expand description
A synchronous client for making FIDL calls.
Implementations§
source§impl Client
impl Client
sourcepub fn new(channel: Channel, protocol_name: &'static str) -> Self
pub fn new(channel: Channel, protocol_name: &'static str) -> Self
Create a new synchronous FIDL client.
sourcepub fn as_channel(&self) -> &Channel
pub fn as_channel(&self) -> &Channel
Return a reference to the underlying channel for the client.
sourcepub fn into_channel(self) -> Channel
pub fn into_channel(self) -> Channel
Get the underlying channel out of the client.
sourcepub fn send<T: TypeMarker>(
&self,
body: impl Encode<T, DefaultFuchsiaResourceDialect>,
ordinal: u64,
dynamic_flags: DynamicFlags,
) -> Result<(), Error>
pub fn send<T: TypeMarker>( &self, body: impl Encode<T, DefaultFuchsiaResourceDialect>, ordinal: u64, dynamic_flags: DynamicFlags, ) -> Result<(), Error>
Send a new message.
sourcepub fn send_query<Request: TypeMarker, Response: TypeMarker>(
&self,
body: impl Encode<Request, DefaultFuchsiaResourceDialect>,
ordinal: u64,
dynamic_flags: DynamicFlags,
deadline: MonotonicInstant,
) -> Result<Response::Owned, Error>
pub fn send_query<Request: TypeMarker, Response: TypeMarker>( &self, body: impl Encode<Request, DefaultFuchsiaResourceDialect>, ordinal: u64, dynamic_flags: DynamicFlags, deadline: MonotonicInstant, ) -> Result<Response::Owned, Error>
Send a new message expecting a response.
sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<MessageBufEtc, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<MessageBufEtc, Error>
Wait for an event to arrive on the underlying channel.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
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