pub struct Autofill<N: Node, C> { /* private fields */ }
Expand description
Autofill decoration.
Trait Implementations
sourceimpl<N, C> Decoration for Autofill<N, C> where
N: NodeImpl,
C: Config<Node = N> + 'static,
impl<N, C> Decoration for Autofill<N, C> where
N: NodeImpl,
C: Config<Node = N> + 'static,
sourceimpl<N, C> DelegatingNodeImpl for Autofill<N, C> where
N: NodeImpl,
C: Config<Node = N>,
impl<N, C> DelegatingNodeImpl for Autofill<N, C> where
N: NodeImpl,
C: Config<Node = N>,
sourceimpl<N, C> Node for Autofill<N, C> where
N: Node,
C: Config<Node = N>,
impl<N, C> Node for Autofill<N, C> where
N: Node,
C: Config<Node = N>,
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) -> LocalBoxFuture<'static, SnapshotFor<Self>>
fn prepare_snapshot(&self) -> LocalBoxFuture<'static, SnapshotFor<Self>>
Requests that snapshot of the node’s current state be taken.
sourcefn affirm_snapshot(
&self,
snapshot: SnapshotFor<Self>
) -> LocalBoxFuture<'static, Result<(), AffirmSnapshotError>>
fn affirm_snapshot(
&self,
snapshot: SnapshotFor<Self>
) -> LocalBoxFuture<'static, Result<(), AffirmSnapshotError>>
Affirms that the given snapshot was written to persistent storage. Read more
sourcefn install_snapshot(
&self,
snapshot: SnapshotFor<Self>
) -> LocalBoxFuture<'static, Result<(), InstallSnapshotError>>
fn install_snapshot(
&self,
snapshot: SnapshotFor<Self>
) -> LocalBoxFuture<'static, Result<(), InstallSnapshotError>>
Requests that the given snapshot be installed. Read more
sourcefn read_stale<F, T>(&self, f: F) -> LocalBoxFuture<'_, Result<T, Disoriented>> where
F: FnOnce(&StateOf<Self>) -> T + Send + 'static,
T: Send + 'static,
fn read_stale<F, T>(&self, f: F) -> LocalBoxFuture<'_, Result<T, Disoriented>> where
F: FnOnce(&StateOf<Self>) -> T + Send + 'static,
T: Send + 'static,
Reads the node’s current state. Read more
sourcefn append<A, P, R>(
&self,
applicable: A,
args: P
) -> LocalBoxFuture<'_, AppendResultFor<Self, A, R>> where
A: ApplicableTo<StateOf<Self>> + 'static,
P: Into<AppendArgs<Self::Invocation, R>>,
R: RetryPolicy<Invocation = Self::Invocation>,
fn append<A, P, R>(
&self,
applicable: A,
args: P
) -> LocalBoxFuture<'_, AppendResultFor<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 append_static<A, P, R>(
&self,
applicable: A,
args: P
) -> LocalBoxFuture<'static, StaticAppendResultFor<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_static<A, P, R>(
&self,
applicable: A,
args: P
) -> LocalBoxFuture<'static, StaticAppendResultFor<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.
Auto Trait Implementations
impl<N, C> !RefUnwindSafe for Autofill<N, C>
impl<N, C> !Send for Autofill<N, C>
impl<N, C> !Sync for Autofill<N, C>
impl<N, C> Unpin for Autofill<N, C> where
C: Unpin,
N: Unpin,
impl<N, C> !UnwindSafe for Autofill<N, C>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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 D where
D: Decoration,
<D as Decoration>::Decorated: LeadershipAwareNode<I>,
impl<D, I> LeadershipAwareNode<(I,)> for D where
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
sourceimpl<D, I> MasterLeasingNode<(I,)> for D where
D: Decoration,
<D as Decoration>::Decorated: MasterLeasingNode<I>,
impl<D, I> MasterLeasingNode<(I,)> for D where
D: Decoration,
<D as Decoration>::Decorated: MasterLeasingNode<I>,
fn read_master_lax<F, T>(
&self,
f: F
) -> Pin<Box<dyn Future<Output = Option<T>>, Global>> where
F: 'static + FnOnce(&<<D as Node>::Invocation as Invocation>::State) -> T + Send,
T: 'static + Send,
fn read_master_strict<F, T>(
&self,
f: F
) -> Pin<Box<dyn Future<Output = Option<T>>, Global>> where
F: 'static + FnOnce(&<<D as Node>::Invocation as Invocation>::State) -> T + Send,
T: 'static + Send,
sourceimpl<D, I> MaybeLeadershipAwareNode<(I,)> for D where
D: 'static + Decoration,
<D as Decoration>::Decorated: MaybeLeadershipAwareNode<I>,
impl<D, I> MaybeLeadershipAwareNode<(I,)> for D where
D: 'static + Decoration,
<D as Decoration>::Decorated: MaybeLeadershipAwareNode<I>,
fn lax_leadership(
&self
) -> Option<&[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
) -> Option<&[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>]>
sourceimpl<D> NodeImpl for D where
D: DelegatingNodeImpl,
impl<D> NodeImpl for D where
D: DelegatingNodeImpl,
sourcefn append_impl<A, P, R>(
&self,
applicable: A,
args: P
) -> Pin<Box<dyn Future<Output = Result<Commit<<<D as Node>::Invocation as Invocation>::State, <<D as Node>::Invocation as Invocation>::RoundNum, <A as ApplicableTo<<<D as Node>::Invocation as Invocation>::State>>::Projection>, ShutDownOr<<R as RetryPolicy>::Error>>> + 'static, Global>> where
A: 'static + ApplicableTo<<<D as Node>::Invocation as Invocation>::State>,
P: Into<AppendArgs<<D as Node>::Invocation, R>>,
R: RetryPolicy<Invocation = <D as Node>::Invocation>,
fn append_impl<A, P, R>(
&self,
applicable: A,
args: P
) -> Pin<Box<dyn Future<Output = Result<Commit<<<D as Node>::Invocation as Invocation>::State, <<D as Node>::Invocation as Invocation>::RoundNum, <A as ApplicableTo<<<D as Node>::Invocation as Invocation>::State>>::Projection>, ShutDownOr<<R as RetryPolicy>::Error>>> + 'static, Global>> where
A: 'static + ApplicableTo<<<D as Node>::Invocation as Invocation>::State>,
P: Into<AppendArgs<<D as Node>::Invocation, R>>,
R: RetryPolicy<Invocation = <D as Node>::Invocation>,
Appends applicable
to the shared log.
sourcefn await_commit_of(
&self,
log_entry_id: <<<<D as Node>::Invocation as Invocation>::State as State>::LogEntry as LogEntry>::Id
) -> Pin<Box<dyn Future<Output = Result<Commit<<<D as Node>::Invocation as Invocation>::State, <<D as Node>::Invocation as Invocation>::RoundNum, <<<<D as Node>::Invocation as Invocation>::State as State>::LogEntry as ApplicableTo<<<D as Node>::Invocation as Invocation>::State>>::Projection>, ShutDown>> + 'static, Global>>
fn await_commit_of(
&self,
log_entry_id: <<<<D as Node>::Invocation as Invocation>::State as State>::LogEntry as LogEntry>::Id
) -> Pin<Box<dyn Future<Output = Result<Commit<<<D as Node>::Invocation as Invocation>::State, <<D as Node>::Invocation as Invocation>::RoundNum, <<<<D as Node>::Invocation as Invocation>::State as State>::LogEntry as ApplicableTo<<<D as Node>::Invocation as Invocation>::State>>::Projection>, ShutDown>> + 'static, Global>>
Wait for the log entry with the given ID to be committed.
sourcefn eject(
&self,
reason: <<D as Node>::Invocation as Invocation>::Ejection
) -> Pin<Box<dyn Future<Output = Result<bool, ShutDown>> + 'static, Global>>
fn eject(
&self,
reason: <<D as Node>::Invocation as Invocation>::Ejection
) -> Pin<Box<dyn Future<Output = Result<bool, ShutDown>> + 'static, Global>>
Eject the node’s state. Read more
sourcefn poll(
&self,
round_num: <<D as Node>::Invocation as Invocation>::RoundNum,
additional_nodes: Vec<<<<D as Node>::Invocation as Invocation>::State as State>::Node, Global>
) -> Pin<Box<dyn Future<Output = Result<bool, AppendError<<D as Node>::Invocation>>> + 'static, Global>>
fn poll(
&self,
round_num: <<D as Node>::Invocation as Invocation>::RoundNum,
additional_nodes: Vec<<<<D as Node>::Invocation as Invocation>::State as State>::Node, Global>
) -> Pin<Box<dyn Future<Output = Result<bool, AppendError<<D as Node>::Invocation>>> + 'static, Global>>
Polls the given nodes for the log entry to apply to the given round. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more