pub struct PrefixControlProxy { /* private fields */ }
Implementations§
source§impl PrefixControlProxy
impl PrefixControlProxy
sourcepub fn take_event_stream(&self) -> PrefixControlEventStream
pub fn take_event_stream(&self) -> PrefixControlEventStream
Get a Stream of events from the remote end of the PrefixControl protocol
Panics
Panics if the event stream was already taken.
sourcepub fn watch_prefix(&self) -> QueryResponseFut<PrefixEvent>
pub fn watch_prefix(&self) -> QueryResponseFut<PrefixEvent>
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 Clone for PrefixControlProxy
impl Clone for PrefixControlProxy
source§fn clone(&self) -> PrefixControlProxy
fn clone(&self) -> PrefixControlProxy
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PrefixControlProxy
impl Debug for PrefixControlProxy
source§impl PrefixControlProxyInterface for PrefixControlProxy
impl PrefixControlProxyInterface for PrefixControlProxy
type WatchPrefixResponseFut = QueryResponseFut<PrefixEvent>
fn watch_prefix(&self) -> Self::WatchPrefixResponseFut
source§impl Proxy for PrefixControlProxy
impl Proxy for PrefixControlProxy
§type Protocol = PrefixControlMarker
type Protocol = PrefixControlMarker
The protocol which this
Proxy
controls.source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Create a proxy over the given channel.
source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Attempt to convert the proxy back into a channel. Read more
source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Get a reference to the proxy’s underlying channel. Read more