pub struct ViewRefInstalledSynchronousProxy { /* private fields */ }
Implementations§
Source§impl ViewRefInstalledSynchronousProxy
impl ViewRefInstalledSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ViewRefInstalledEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ViewRefInstalledEvent, 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 watch(
&self,
view_ref: ViewRef,
___deadline: MonotonicInstant,
) -> Result<ViewRefInstalledWatchResult, Error>
pub fn watch( &self, view_ref: ViewRef, ___deadline: MonotonicInstant, ) -> Result<ViewRefInstalledWatchResult, Error>
Sets up a callback to fire when the requested |view_ref| is installed.
- If |view_ref| has not already been installed, the |Watch| response will fire when it is.
- If |view_ref| has already been installed, the |Watch| response will fire immediately.
- If |view_ref| is invalid, or becomes invalid (perhaps because the view was destroyed), the |Watch| call returns with an error. The error is not guaranteed to be immediate, but a ViewRef holder can itself determine ViewRef validity by listening for ZX_EVENTPAIR_PEER_CLOSED.
Flow control: The caller is allowed multiple |Watch| calls on multiple ViewRefs. There is at most one response per call back to the client.
Note: Prior to installation, this |Watch| call is kept alive as long as the ViewRef is valid.
Trait Implementations§
Source§impl SynchronousProxy for ViewRefInstalledSynchronousProxy
impl SynchronousProxy for ViewRefInstalledSynchronousProxy
Source§type Proxy = ViewRefInstalledProxy
type Proxy = ViewRefInstalledProxy
The async proxy for the same protocol.
Source§type Protocol = ViewRefInstalledMarker
type Protocol = ViewRefInstalledMarker
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 ViewRefInstalledSynchronousProxy
impl RefUnwindSafe for ViewRefInstalledSynchronousProxy
impl Send for ViewRefInstalledSynchronousProxy
impl Sync for ViewRefInstalledSynchronousProxy
impl Unpin for ViewRefInstalledSynchronousProxy
impl UnwindSafe for ViewRefInstalledSynchronousProxy
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