pub struct Shell<N: NodeImpl> { /* private fields */ }
Expand description
The Node
implementation that’s returned from
NodeBuilder
s.
This Node
implementation processes requests from NodeHandle
s. It
delegates to the outermost Decoration
,
thus giving decorations a chance to intercept.
Trait Implementations
sourceimpl<N, I> LeadershipAwareNode<(I,)> for Shell<N> where
N: NodeImpl + LeadershipAwareNode<I>,
impl<N, I> LeadershipAwareNode<(I,)> for Shell<N> where
N: NodeImpl + LeadershipAwareNode<I>,
sourcefn lax_leadership(&self) -> &[LeadershipFor<N>]
fn lax_leadership(&self) -> &[LeadershipFor<N>]
Leadership as assumed by this node. Read more
sourcefn strict_leadership(&self) -> &[LeadershipFor<N>]
fn strict_leadership(&self) -> &[LeadershipFor<N>]
Leadership as assumed by this node. Read more
sourceimpl<N> Node for Shell<N> where
N: NodeImpl,
impl<N> Node for Shell<N> where
N: NodeImpl,
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 handle(&self) -> NodeHandle<Self::Invocation>
fn handle(&self) -> NodeHandle<Self::Invocation>
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> !RefUnwindSafe for Shell<N>
impl<N> !Send for Shell<N>
impl<N> !Sync for Shell<N>
impl<N> Unpin for Shell<N> where
N: Unpin,
impl<N> !UnwindSafe for Shell<N>
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>
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