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: Time
) -> Result<PrefixControlEvent, Error>
pub fn wait_for_event( &self, deadline: Time ) -> 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: Time) -> Result<PrefixEvent, Error>
pub fn watch_prefix(&self, ___deadline: Time) -> 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.