pub struct PrefixControlSynchronousProxy { /* private fields */ }
Implementations§
Source§impl PrefixControlSynchronousProxy
impl PrefixControlSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<PrefixControlEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<PrefixControlEvent, 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_prefix(
&self,
___deadline: MonotonicInstant,
) -> Result<PrefixEvent, Error>
pub fn watch_prefix( &self, ___deadline: MonotonicInstant, ) -> Result<PrefixEvent, Error>
Hanging get for the prefix and its lifetimes.
The first call to this method is guaranteed to return
[PrefixEvent.assigned
], and will occur when there is a prefix
to report. Subsequent calls will return immediately if there is a
change to report, or block until a change occurs.
It is invalid to call this method while a previous call is pending.
Doing so will cause the server end of the protocol to be closed with
the terminal event [PrefixControlExitReason.DOUBLE_WATCH
].
- response
event
an optional prefix.
Trait Implementations§
Source§impl SynchronousProxy for PrefixControlSynchronousProxy
impl SynchronousProxy for PrefixControlSynchronousProxy
Source§type Proxy = PrefixControlProxy
type Proxy = PrefixControlProxy
The async proxy for the same protocol.
Source§type Protocol = PrefixControlMarker
type Protocol = PrefixControlMarker
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 PrefixControlSynchronousProxy
impl RefUnwindSafe for PrefixControlSynchronousProxy
impl Send for PrefixControlSynchronousProxy
impl Sync for PrefixControlSynchronousProxy
impl Unpin for PrefixControlSynchronousProxy
impl UnwindSafe for PrefixControlSynchronousProxy
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