pub struct Delegate<N, C, I = ()>where
N: LeadershipAwareNode<I> + 'static,
C: Config<Node = N>,{ /* private fields */ }
Expand description
Delegate decoration.
Trait Implementations
sourceimpl<N, C, I> Decoration for Delegate<N, C, I>where
N: NodeImpl + LeadershipAwareNode<I> + 'static,
C: Config<Node = N> + 'static,
impl<N, C, I> Decoration for Delegate<N, C, I>where
N: NodeImpl + LeadershipAwareNode<I> + 'static,
C: Config<Node = N> + 'static,
sourceimpl<N, C, I> Node for Delegate<N, C, I>where
N: LeadershipAwareNode<I> + NodeImpl + 'static,
C: Config<Node = N> + 'static,
impl<N, C, I> Node for Delegate<N, C, I>where
N: LeadershipAwareNode<I> + NodeImpl + 'static,
C: Config<Node = N> + 'static,
type Invocation = <N as Node>::Invocation
type Invocation = <N as Node>::Invocation
Parametrization of the paxakos algorithm.
sourcefn status(&self) -> NodeStatus
fn status(&self) -> NodeStatus
Node’s current status.
sourcefn participation(&self) -> Participation<RoundNumOf<Self>>
fn participation(&self) -> Participation<RoundNumOf<Self>>
Node’s current mode of participation.
sourcefn 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
sourcefn 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.
sourcefn 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
sourcefn 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
sourcefn read_stale<F, T>(&self, f: F) -> BoxFuture<'_, Result<T, Disoriented>>where
F: FnOnce(&StateOf<Self>) -> T + Send + 'static,
T: Send + 'static,
fn read_stale<F, T>(&self, f: F) -> BoxFuture<'_, Result<T, Disoriented>>where
F: FnOnce(&StateOf<Self>) -> T + Send + 'static,
T: Send + 'static,
Reads the node’s current state. Read more
sourcefn read_stale_infallibly<F, T>(&self, f: F) -> BoxFuture<'_, T>where
F: FnOnce(Option<&StateOf<Self>>) -> T + Send + 'static,
T: Send + 'static,
fn read_stale_infallibly<F, T>(&self, f: F) -> BoxFuture<'_, T>where
F: FnOnce(Option<&StateOf<Self>>) -> T + Send + 'static,
T: Send + 'static,
Reads the node’s current state. Read more
sourcefn read_stale_scoped<'read, F, T>(
&self,
f: F
) -> BoxFuture<'read, Result<T, Disoriented>>where
F: FnOnce(&StateOf<Self>) -> T + Send + 'read,
T: Send + 'static,
fn read_stale_scoped<'read, F, T>(
&self,
f: F
) -> BoxFuture<'read, Result<T, Disoriented>>where
F: FnOnce(&StateOf<Self>) -> T + Send + 'read,
T: Send + 'static,
Reads the node’s current state. Read more
sourcefn read_stale_scoped_infallibly<'read, F, T>(&self, f: F) -> BoxFuture<'read, T>where
F: FnOnce(Option<&StateOf<Self>>) -> T + Send + 'read,
T: Send + 'static,
fn read_stale_scoped_infallibly<'read, F, T>(&self, f: F) -> BoxFuture<'read, T>where
F: FnOnce(Option<&StateOf<Self>>) -> T + Send + 'read,
T: Send + 'static,
Reads the node’s current state. Read more
sourcefn 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.sourcefn 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. Read more
sourceimpl<N, C, I> NodeImpl for Delegate<N, C, I>where
N: NodeImpl + LeadershipAwareNode<I> + 'static,
C: Config<Node = N> + 'static,
impl<N, C, I> NodeImpl for Delegate<N, C, I>where
N: NodeImpl + LeadershipAwareNode<I> + 'static,
C: Config<Node = N> + 'static,
sourcefn 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.sourcefn 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.
sourcefn eject(
&mut self,
reason: EjectionOf<Self>
) -> BoxFuture<'static, Result<bool, ShutDown>>
fn eject(
&mut self,
reason: EjectionOf<Self>
) -> BoxFuture<'static, Result<bool, ShutDown>>
Eject the node’s state. Read more
sourcefn poll(
&mut self,
round_num: RoundNumOf<Self>,
additional_nodes: Vec<NodeOf<Self>>
) -> BoxFuture<'static, Result<bool, PollError<Self::Invocation>>>
fn poll(
&mut self,
round_num: RoundNumOf<Self>,
additional_nodes: Vec<NodeOf<Self>>
) -> BoxFuture<'static, Result<bool, PollError<Self::Invocation>>>
Polls the given nodes for the log entry to apply to the given round. Read more
Auto Trait Implementations
impl<N, C, I = ()> !RefUnwindSafe for Delegate<N, C, I>
impl<N, C, I> Send for Delegate<N, C, I>where
C: Send,
I: Send,
N: Send,
impl<N, C, I = ()> !Sync for Delegate<N, C, I>
impl<N, C, I> Unpin for Delegate<N, C, I>where
C: Unpin,
I: Unpin,
N: Unpin,
impl<N, C, I = ()> !UnwindSafe for Delegate<N, C, I>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<D, I> LeadershipAwareNode<(I,)> for Dwhere
D: Decoration,
<D as Decoration>::Decorated: LeadershipAwareNode<I>,
impl<D, I> LeadershipAwareNode<(I,)> for Dwhere
D: Decoration,
<D as Decoration>::Decorated: LeadershipAwareNode<I>,
sourcefn 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
sourcefn 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