Struct Client
pub struct Client { /* private fields */ }
Expand description
A synchronous client for making FIDL calls.
Implementations§
§impl Client
impl Client
pub fn new(channel: Channel, protocol_name: &'static str) -> Client
pub fn new(channel: Channel, protocol_name: &'static str) -> Client
Create a new synchronous FIDL client.
pub fn as_channel(&self) -> &Channel
pub fn as_channel(&self) -> &Channel
Return a reference to the underlying channel for the client.
pub fn into_channel(self) -> Channel
pub fn into_channel(self) -> Channel
Get the underlying channel out of the client.
pub fn send<T>(
&self,
body: impl Encode<T, DefaultFuchsiaResourceDialect>,
ordinal: u64,
dynamic_flags: DynamicFlags,
) -> Result<(), Error>where
T: TypeMarker,
pub fn send<T>(
&self,
body: impl Encode<T, DefaultFuchsiaResourceDialect>,
ordinal: u64,
dynamic_flags: DynamicFlags,
) -> Result<(), Error>where
T: TypeMarker,
Send a new message.
pub fn send_query<Request, Response>(
&self,
body: impl Encode<Request, DefaultFuchsiaResourceDialect>,
ordinal: u64,
dynamic_flags: DynamicFlags,
deadline: Instant<MonotonicTimeline>,
) -> Result<<Response as TypeMarker>::Owned, Error>where
Request: TypeMarker,
Response: TypeMarker,
<Response as TypeMarker>::Owned: Decode<Response, DefaultFuchsiaResourceDialect>,
pub fn send_query<Request, Response>(
&self,
body: impl Encode<Request, DefaultFuchsiaResourceDialect>,
ordinal: u64,
dynamic_flags: DynamicFlags,
deadline: Instant<MonotonicTimeline>,
) -> Result<<Response as TypeMarker>::Owned, Error>where
Request: TypeMarker,
Response: TypeMarker,
<Response as TypeMarker>::Owned: Decode<Response, DefaultFuchsiaResourceDialect>,
Send a new message expecting a response.
pub fn wait_for_event(
&self,
deadline: Instant<MonotonicTimeline>,
) -> Result<MessageBufEtc, Error>
pub fn wait_for_event( &self, deadline: Instant<MonotonicTimeline>, ) -> 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