pub struct RuleWatcherV4SynchronousProxy { /* private fields */ }
Implementations§
Source§impl RuleWatcherV4SynchronousProxy
impl RuleWatcherV4SynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<RuleWatcherV4Event, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<RuleWatcherV4Event, 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,
___deadline: MonotonicInstant,
) -> Result<Vec<RuleEventV4>, Error>
pub fn watch( &self, ___deadline: MonotonicInstant, ) -> Result<Vec<RuleEventV4>, Error>
Hanging-Get style API for observing routing rule changes.
Clients must only have one pending Watch
call at a time. Calling
Watch
while a request is already pending will cause the protocol to
close.
The first N events will always be existing
where N is the number of
IPv4 rules that already existed when the server-end of the protocol was
initialized. The following event will be idle
signaling the end of the
existing
events. At this point the client has watched all existing
state and will never again observe an existing
event.
- response
events
A vector of at mostMAX_EVENTS
events.
Trait Implementations§
Source§impl SynchronousProxy for RuleWatcherV4SynchronousProxy
impl SynchronousProxy for RuleWatcherV4SynchronousProxy
Source§type Proxy = RuleWatcherV4Proxy
type Proxy = RuleWatcherV4Proxy
The async proxy for the same protocol.
Source§type Protocol = RuleWatcherV4Marker
type Protocol = RuleWatcherV4Marker
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 RuleWatcherV4SynchronousProxy
impl RefUnwindSafe for RuleWatcherV4SynchronousProxy
impl Send for RuleWatcherV4SynchronousProxy
impl Sync for RuleWatcherV4SynchronousProxy
impl Unpin for RuleWatcherV4SynchronousProxy
impl UnwindSafe for RuleWatcherV4SynchronousProxy
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