pub struct Delegate<N, C, I = ()>where
N: LeadershipAwareNode<I> + 'static,
C: Config<Node = N>,{ /* private fields */ }Expand description
Delegate decoration.
Trait Implementations§
Source§impl<N, C, I> Decoration for Delegate<N, C, I>
impl<N, C, I> Decoration for Delegate<N, C, I>
Source§impl<N, C, I> Node for Delegate<N, C, I>
impl<N, C, I> Node for Delegate<N, C, I>
Source§type Invocation = <N as Node>::Invocation
type Invocation = <N as Node>::Invocation
Parametrization of the paxakos algorithm.
Source§fn status(&self) -> NodeStatus
fn status(&self) -> NodeStatus
Node’s current status.
Source§fn participation(&self) -> Participation<RoundNumOf<Self>>
fn participation(&self) -> Participation<RoundNumOf<Self>>
Node’s current mode of participation.
Source§fn poll_events(&mut self, cx: &mut Context<'_>) -> Poll<EventFor<Self>>
fn poll_events(&mut self, cx: &mut Context<'_>) -> Poll<EventFor<Self>>
Polls the node’s event stream. Read more
Source§fn prepare_snapshot(&self) -> BoxFuture<'static, SnapshotFor<Self>>
fn prepare_snapshot(&self) -> BoxFuture<'static, SnapshotFor<Self>>
Requests that snapshot of the node’s current state be taken.
Source§fn affirm_snapshot(
&self,
snapshot: SnapshotFor<Self>,
) -> BoxFuture<'static, Result<(), AffirmSnapshotError>>
fn affirm_snapshot( &self, snapshot: SnapshotFor<Self>, ) -> BoxFuture<'static, Result<(), AffirmSnapshotError>>
Affirms that the given snapshot was written to persistent storage. Read more
Source§fn install_snapshot(
&self,
snapshot: SnapshotFor<Self>,
) -> BoxFuture<'static, Result<(), InstallSnapshotError>>
fn install_snapshot( &self, snapshot: SnapshotFor<Self>, ) -> BoxFuture<'static, Result<(), InstallSnapshotError>>
Requests that the given snapshot be installed. Read more
Source§fn read_stale<F, T>(&self, f: F) -> BoxFuture<'_, Result<T, Disoriented>>
fn read_stale<F, T>(&self, f: F) -> BoxFuture<'_, Result<T, Disoriented>>
Reads the node’s current state. Read more
Source§fn read_stale_infallibly<F, T>(&self, f: F) -> BoxFuture<'_, T>
fn read_stale_infallibly<F, T>(&self, f: F) -> BoxFuture<'_, T>
Reads the node’s current state. Read more
Source§fn read_stale_scoped<'read, F, T>(
&self,
f: F,
) -> BoxFuture<'read, Result<T, Disoriented>>
fn read_stale_scoped<'read, F, T>( &self, f: F, ) -> BoxFuture<'read, Result<T, Disoriented>>
Reads the node’s current state. Read more
Source§fn read_stale_scoped_infallibly<'read, F, T>(&self, f: F) -> BoxFuture<'read, T>
fn read_stale_scoped_infallibly<'read, F, T>(&self, f: F) -> BoxFuture<'read, T>
Reads the node’s current state. Read more
Source§fn append<A, P, R>(
&mut self,
applicable: A,
args: P,
) -> BoxFuture<'static, AppendResultFor<Self, A, R>>where
A: ApplicableTo<StateOf<Self>> + 'static,
P: Into<AppendArgs<Self::Invocation, R>>,
R: RetryPolicy<Invocation = Self::Invocation>,
R::StaticError: From<ShutDownOr<R::Error>>,
fn append<A, P, R>(
&mut self,
applicable: A,
args: P,
) -> BoxFuture<'static, AppendResultFor<Self, A, R>>where
A: ApplicableTo<StateOf<Self>> + 'static,
P: Into<AppendArgs<Self::Invocation, R>>,
R: RetryPolicy<Invocation = Self::Invocation>,
R::StaticError: From<ShutDownOr<R::Error>>,
Appends
applicable to the shared log.Source§fn next_event(&mut self) -> NextEvent<'_, Self> ⓘ
fn next_event(&mut self) -> NextEvent<'_, Self> ⓘ
Returns a future that polls this node for events until the next one is
returned.
Source§impl<N, C, I> NodeImpl for Delegate<N, C, I>
impl<N, C, I> NodeImpl for Delegate<N, C, I>
Source§fn append_impl<A, P, R>(
&mut self,
applicable: A,
args: P,
) -> BoxFuture<'static, ImplAppendResultFor<Self, A, R>>where
A: ApplicableTo<StateOf<Self>> + 'static,
P: Into<AppendArgs<Self::Invocation, R>>,
R: RetryPolicy<Invocation = Self::Invocation>,
fn append_impl<A, P, R>(
&mut self,
applicable: A,
args: P,
) -> BoxFuture<'static, ImplAppendResultFor<Self, A, R>>where
A: ApplicableTo<StateOf<Self>> + 'static,
P: Into<AppendArgs<Self::Invocation, R>>,
R: RetryPolicy<Invocation = Self::Invocation>,
Appends
applicable to the shared log.Source§fn await_commit_of(
&mut self,
log_entry_id: LogEntryIdOf<Self>,
) -> BoxFuture<'static, Result<CommitFor<Self>, ShutDown>>
fn await_commit_of( &mut self, log_entry_id: LogEntryIdOf<Self>, ) -> BoxFuture<'static, Result<CommitFor<Self>, ShutDown>>
Wait for the log entry with the given ID to be committed.
Auto Trait Implementations§
impl<N, C, I = ()> !Freeze for Delegate<N, C, I>
impl<N, C, I = ()> !RefUnwindSafe for Delegate<N, C, I>
impl<N, C, I> Send for Delegate<N, C, I>
impl<N, C, I = ()> !Sync for Delegate<N, C, I>
impl<N, C, I> Unpin for Delegate<N, C, I>
impl<N, C, I> UnsafeUnpin for Delegate<N, C, I>where
N: UnsafeUnpin,
C: UnsafeUnpin,
impl<N, C, I = ()> !UnwindSafe for Delegate<N, C, I>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<D, I> LeadershipAwareNode<(I,)> for D
impl<D, I> LeadershipAwareNode<(I,)> for D
Source§fn lax_leadership(
&self,
) -> &[Leadership<<<<<D as Node>::Invocation as Invocation>::State as State>::Node as NodeInfo>::Id, <<D as Node>::Invocation as Invocation>::RoundNum, <<D as Node>::Invocation as Invocation>::CoordNum>]
fn lax_leadership( &self, ) -> &[Leadership<<<<<D as Node>::Invocation as Invocation>::State as State>::Node as NodeInfo>::Id, <<D as Node>::Invocation as Invocation>::RoundNum, <<D as Node>::Invocation as Invocation>::CoordNum>]
Leadership as assumed by this node. Read more
Source§fn strict_leadership(
&self,
) -> &[Leadership<<<<<D as Node>::Invocation as Invocation>::State as State>::Node as NodeInfo>::Id, <<D as Node>::Invocation as Invocation>::RoundNum, <<D as Node>::Invocation as Invocation>::CoordNum>]
fn strict_leadership( &self, ) -> &[Leadership<<<<<D as Node>::Invocation as Invocation>::State as State>::Node as NodeInfo>::Id, <<D as Node>::Invocation as Invocation>::RoundNum, <<D as Node>::Invocation as Invocation>::CoordNum>]
Leadership as assumed by this node. Read more