pub struct CounterSynchronousProxy { /* private fields */ }
Implementations§
Source§impl CounterSynchronousProxy
impl CounterSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<CounterEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<CounterEvent, 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 increment(&self, ___deadline: MonotonicInstant) -> Result<u32, Error>
pub fn increment(&self, ___deadline: MonotonicInstant) -> Result<u32, Error>
Increments internal counter by one and returns new counter value.
Sourcepub fn connect_to_protocol(
&self,
protocol_name: &str,
request: Channel,
) -> Result<(), Error>
pub fn connect_to_protocol( &self, protocol_name: &str, request: Channel, ) -> Result<(), Error>
Connects request
to a protocol in the /svc
directory named
protocol_name
.
Sourcepub fn open_in_namespace(
&self,
path: &str,
flags: Flags,
request: Channel,
) -> Result<(), Error>
pub fn open_in_namespace( &self, path: &str, flags: Flags, request: Channel, ) -> Result<(), Error>
Opens the node found at path
in the component’s namespace with
flags
, and connects request
.
This is essentially a wrapper around [fuchsia.io/Directory.Open
],
which always opens in an implementation-defined mode.
- request
path
the absolute path from the root of the server’s namespace. - request
flags
the rights with which to open the node. - request
request
the server end channel to the node.
Sourcepub fn try_open_directory(
&self,
path: &str,
___deadline: MonotonicInstant,
) -> Result<CounterTryOpenDirectoryResult, Error>
pub fn try_open_directory( &self, path: &str, ___deadline: MonotonicInstant, ) -> Result<CounterTryOpenDirectoryResult, Error>
Opens the directory found at path
.
- request
path
the absolute path from the server’s namespace.
- error
ZX_ERR_NOT_FOUND
if the directory atpath
is not in the server’s namespace. - error
ZX_ERR_IO
if there is some other unspecified error during I/O.
Trait Implementations§
Source§impl Debug for CounterSynchronousProxy
impl Debug for CounterSynchronousProxy
Source§impl SynchronousProxy for CounterSynchronousProxy
impl SynchronousProxy for CounterSynchronousProxy
Source§type Proxy = CounterProxy
type Proxy = CounterProxy
The async proxy for the same protocol.
Source§type Protocol = CounterMarker
type Protocol = CounterMarker
The protocol which this
Proxy
controls.Source§fn from_channel(inner: Channel) -> Self
fn from_channel(inner: Channel) -> Self
Create a proxy over the given channel.
Source§fn into_channel(self) -> Channel
fn into_channel(self) -> Channel
Convert the proxy back into a channel.
Source§fn as_channel(&self) -> &Channel
fn as_channel(&self) -> &Channel
Get a reference to the proxy’s underlying channel. Read more
Auto Trait Implementations§
impl Freeze for CounterSynchronousProxy
impl RefUnwindSafe for CounterSynchronousProxy
impl Send for CounterSynchronousProxy
impl Sync for CounterSynchronousProxy
impl Unpin for CounterSynchronousProxy
impl UnwindSafe for CounterSynchronousProxy
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