pub struct RegistrySynchronousProxy { /* private fields */ }
Implementations§
Source§impl RegistrySynchronousProxy
impl RegistrySynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<RegistryEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<RegistryEvent, 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 connect(
&self,
fuzzer_url: &str,
controller: ServerEnd<ControllerMarker>,
timeout: i64,
___deadline: MonotonicInstant,
) -> Result<RegistryConnectResult, Error>
pub fn connect( &self, fuzzer_url: &str, controller: ServerEnd<ControllerMarker>, timeout: i64, ___deadline: MonotonicInstant, ) -> Result<RegistryConnectResult, Error>
Connects the Controller
to a registered fuzzer.
Uses a ControllerProvider
that has been Register
ed with the given
URL to connect. If the associated provider is not available, it assumes
it is starting and blocks until the fuzzer calls Registrar.Register
,
or the given timeout
elapses. At most one call to Connect
will block
in this manner at a time.
- request
fuzzer_url
the package URL for the fuzzer. - request
provider
the connection to aController
client. - request
tiemout
maximum duration to wait for a connection.
- error one of the following:
ZX_ERR_TIMED_OUT
if thetimeout
elapses without the provider becoming available.ZX_ERR_SHOULD_WAIT
if already waiting for a fuzzer to start.
Sourcepub fn disconnect(
&self,
fuzzer_url: &str,
___deadline: MonotonicInstant,
) -> Result<RegistryDisconnectResult, Error>
pub fn disconnect( &self, fuzzer_url: &str, ___deadline: MonotonicInstant, ) -> Result<RegistryDisconnectResult, Error>
Removes the provider associated with the given URL from the registry and closes its channel. The associated fuzzer should exit upon channel closure.
- request
fuzzer_url
the package URL for the fuzzer.
- error
ZX_ERR_NOT_FOUND
if no such provider exists in the registry.
Trait Implementations§
Source§impl Debug for RegistrySynchronousProxy
impl Debug for RegistrySynchronousProxy
Source§impl SynchronousProxy for RegistrySynchronousProxy
impl SynchronousProxy for RegistrySynchronousProxy
Source§type Proxy = RegistryProxy
type Proxy = RegistryProxy
The async proxy for the same protocol.
Source§type Protocol = RegistryMarker
type Protocol = RegistryMarker
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 RegistrySynchronousProxy
impl RefUnwindSafe for RegistrySynchronousProxy
impl Send for RegistrySynchronousProxy
impl Sync for RegistrySynchronousProxy
impl Unpin for RegistrySynchronousProxy
impl UnwindSafe for RegistrySynchronousProxy
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