pub struct MembershipHandle<P: Protocol> { /* private fields */ }Expand description
Changes the membership of a running Supervised.
A call waits for the task to take the change and for its answer. The task takes changes between frames on a live connection, and during an outage’s backoff, but not while the consumer’s queue is full: a call made from the task that reads the stream can then wait for ever. Make changes from another task, or keep reading while one is pending.
Implementations§
Source§impl<P: Protocol> MembershipHandle<P>
impl<P: Protocol> MembershipHandle<P>
Sourcepub async fn apply(&self, change: P::Change) -> Result<P::Ack, P::Error>
pub async fn apply(&self, change: P::Change) -> Result<P::Ack, P::Error>
Make one change, and wait for its answer: from
Protocol::apply on a live connection, from Protocol::record
during an outage, Protocol::stalled for a request left unanswered
for the staleness window, or Protocol::stopped once the task has
stopped.
Trait Implementations§
Source§impl<P: Protocol> Clone for MembershipHandle<P>
impl<P: Protocol> Clone for MembershipHandle<P>
Auto Trait Implementations§
impl<P> Freeze for MembershipHandle<P>
impl<P> RefUnwindSafe for MembershipHandle<P>where
Sender<Command<P>>: RefUnwindSafe,
impl<P> Send for MembershipHandle<P>
impl<P> Sync for MembershipHandle<P>
impl<P> Unpin for MembershipHandle<P>
impl<P> UnsafeUnpin for MembershipHandle<P>where
Sender<Command<P>>: UnsafeUnpin,
impl<P> UnwindSafe for MembershipHandle<P>where
Sender<Command<P>>: UnwindSafe,
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