Struct paxakos::node_builder::NodeBuilder
source · [−]pub struct NodeBuilder<N: Node, F: Finisher<Node = N>, V = IndiscriminateVoterFor<N>, B = InMemoryBuffer<RoundNumOf<N>, CoordNumOf<N>, LogEntryOf<N>>, E: Executor = StdThread> { /* private fields */ }
Expand description
Node builder with all essential information set.
Implementations
sourceimpl<N, F, V, B, E> NodeBuilder<N, F, V, B, E> where
N: NodeImpl + 'static,
F: Finisher<Node = N>,
V: Voter<State = StateOf<N>, RoundNum = RoundNumOf<N>, CoordNum = CoordNumOf<N>, Abstain = AbstainOf<N>, Yea = YeaOf<N>, Nay = NayOf<N>>,
B: Buffer<RoundNum = RoundNumOf<N>, CoordNum = CoordNumOf<N>, Entry = LogEntryOf<N>>,
E: Executor,
impl<N, F, V, B, E> NodeBuilder<N, F, V, B, E> where
N: NodeImpl + 'static,
F: Finisher<Node = N>,
V: Voter<State = StateOf<N>, RoundNum = RoundNumOf<N>, CoordNum = CoordNumOf<N>, Abstain = AbstainOf<N>, Yea = YeaOf<N>, Nay = NayOf<N>>,
B: Buffer<RoundNum = RoundNumOf<N>, CoordNum = CoordNumOf<N>, Entry = LogEntryOf<N>>,
E: Executor,
sourcepub fn buffering_applied_entries_in<T: Buffer<RoundNum = RoundNumOf<N>, CoordNum = CoordNumOf<N>, Entry = LogEntryOf<N>>>(
self,
buffer: T
) -> NodeBuilder<N, F, V, T, E>
pub fn buffering_applied_entries_in<T: Buffer<RoundNum = RoundNumOf<N>, CoordNum = CoordNumOf<N>, Entry = LogEntryOf<N>>>(
self,
buffer: T
) -> NodeBuilder<N, F, V, T, E>
Sets the applied entry buffer.
sourcepub fn driven_by<T: Executor>(self, executor: T) -> NodeBuilder<N, F, V, B, T>
pub fn driven_by<T: Executor>(self, executor: T) -> NodeBuilder<N, F, V, B, T>
Sets the executor to be used.
sourcepub fn traced_by<T: Into<Box<dyn Tracer<InvocationOf<N>>>>>(
self,
tracer: T
) -> Self
pub fn traced_by<T: Into<Box<dyn Tracer<InvocationOf<N>>>>>(
self,
tracer: T
) -> Self
Tracer to record events with.
sourcepub fn voting_with<T>(self, voter: T) -> NodeBuilder<N, F, T, B, E>
pub fn voting_with<T>(self, voter: T) -> NodeBuilder<N, F, T, B, E>
Sets the voting strategy to use.
sourcepub fn using(self, kit: NodeKit<InvocationOf<N>>) -> Self
pub fn using(self, kit: NodeKit<InvocationOf<N>>) -> Self
Sets the node kit to use.
sourcepub fn spawn(self) -> LocalBoxFuture<'static, SpawnResult<N, ErrorOf<E>>> where
StateOf<N>: State<Context = ()>,
pub fn spawn(self) -> LocalBoxFuture<'static, SpawnResult<N, ErrorOf<E>>> where
StateOf<N>: State<Context = ()>,
Spawns the node into context ()
.
sourcepub fn spawn_in(
self,
context: ContextOf<N>
) -> LocalBoxFuture<'static, SpawnResult<N, ErrorOf<E>>>
pub fn spawn_in(
self,
context: ContextOf<N>
) -> LocalBoxFuture<'static, SpawnResult<N, ErrorOf<E>>>
Spawns the node in the given context.
Trait Implementations
sourceimpl<N, F, V, B, E> ExtensibleNodeBuilder for NodeBuilder<N, F, V, B, E> where
N: NodeImpl + 'static,
F: Finisher<Node = N>,
V: Voter<State = StateOf<N>, RoundNum = RoundNumOf<N>, CoordNum = CoordNumOf<N>, Abstain = AbstainOf<N>, Yea = YeaOf<N>, Nay = NayOf<N>>,
B: Buffer<RoundNum = RoundNumOf<N>, CoordNum = CoordNumOf<N>, Entry = LogEntryOf<N>>,
E: Executor,
impl<N, F, V, B, E> ExtensibleNodeBuilder for NodeBuilder<N, F, V, B, E> where
N: NodeImpl + 'static,
F: Finisher<Node = N>,
V: Voter<State = StateOf<N>, RoundNum = RoundNumOf<N>, CoordNum = CoordNumOf<N>, Abstain = AbstainOf<N>, Yea = YeaOf<N>, Nay = NayOf<N>>,
B: Buffer<RoundNum = RoundNumOf<N>, CoordNum = CoordNumOf<N>, Entry = LogEntryOf<N>>,
E: Executor,
type Node = N
type Node = N
Node type without decoration applied.
type DecoratedBuilder<D: Decoration<Decorated = N> + 'static> = NodeBuilder<D, impl Finisher<Node = D>, V, B, E>
type DecoratedBuilder<D: Decoration<Decorated = N> + 'static> = NodeBuilder<D, impl Finisher<Node = D>, V, B, E>
Type of this builder after decoration D
is applied.
sourcefn decorated_with<D>(
self,
arguments: <D as Decoration>::Arguments
) -> Self::DecoratedBuilder<D> where
D: Decoration<Decorated = N, Invocation = InvocationOf<N>> + 'static,
fn decorated_with<D>(
self,
arguments: <D as Decoration>::Arguments
) -> Self::DecoratedBuilder<D> where
D: Decoration<Decorated = N, Invocation = InvocationOf<N>> + 'static,
Adds a decoration to wrap around the resulting node.
Auto Trait Implementations
impl<N, F, V = IndiscriminateVoter<<<N as Node>::Invocation as Invocation>::State, <<N as Node>::Invocation as Invocation>::RoundNum, <<N as Node>::Invocation as Invocation>::CoordNum, <<N as Node>::Invocation as Invocation>::Abstain, <<N as Node>::Invocation as Invocation>::Yea, <<N as Node>::Invocation as Invocation>::Nay>, B = InMemoryBuffer<<<N as Node>::Invocation as Invocation>::RoundNum, <<N as Node>::Invocation as Invocation>::CoordNum, <<<N as Node>::Invocation as Invocation>::State as State>::LogEntry>, E = StdThread> !RefUnwindSafe for NodeBuilder<N, F, V, B, E>
impl<N, F, V, B, E> Send for NodeBuilder<N, F, V, B, E> where
B: Send,
E: Send,
F: Send,
V: Send,
<F as Finisher>::Communicator: Send,
impl<N, F, V = IndiscriminateVoter<<<N as Node>::Invocation as Invocation>::State, <<N as Node>::Invocation as Invocation>::RoundNum, <<N as Node>::Invocation as Invocation>::CoordNum, <<N as Node>::Invocation as Invocation>::Abstain, <<N as Node>::Invocation as Invocation>::Yea, <<N as Node>::Invocation as Invocation>::Nay>, B = InMemoryBuffer<<<N as Node>::Invocation as Invocation>::RoundNum, <<N as Node>::Invocation as Invocation>::CoordNum, <<<N as Node>::Invocation as Invocation>::State as State>::LogEntry>, E = StdThread> !Sync for NodeBuilder<N, F, V, B, E>
impl<N, F, V, B, E> Unpin for NodeBuilder<N, F, V, B, E> where
B: Unpin,
E: Unpin,
F: Unpin,
V: Unpin,
<F as Finisher>::Communicator: Unpin,
impl<N, F, V = IndiscriminateVoter<<<N as Node>::Invocation as Invocation>::State, <<N as Node>::Invocation as Invocation>::RoundNum, <<N as Node>::Invocation as Invocation>::CoordNum, <<N as Node>::Invocation as Invocation>::Abstain, <<N as Node>::Invocation as Invocation>::Yea, <<N as Node>::Invocation as Invocation>::Nay>, B = InMemoryBuffer<<<N as Node>::Invocation as Invocation>::RoundNum, <<N as Node>::Invocation as Invocation>::CoordNum, <<<N as Node>::Invocation as Invocation>::State as State>::LogEntry>, E = StdThread> !UnwindSafe for NodeBuilder<N, F, V, B, E>
Blanket Implementations
sourceimpl<B> AutofillBuilderExt for B where
B: ExtensibleNodeBuilder,
<B as ExtensibleNodeBuilder>::Node: 'static,
<B as ExtensibleNodeBuilder>::Node: NodeImpl,
impl<B> AutofillBuilderExt for B where
B: ExtensibleNodeBuilder,
<B as ExtensibleNodeBuilder>::Node: 'static,
<B as ExtensibleNodeBuilder>::Node: NodeImpl,
type Node = <B as ExtensibleNodeBuilder>::Node
type Node = <B as ExtensibleNodeBuilder>::Node
Type of node to be decorated.
type DecoratedBuilder = <B as ExtensibleNodeBuilder>::DecoratedBuilder<Autofill<<B as ExtensibleNodeBuilder>::Node, C>>
type DecoratedBuilder = <B as ExtensibleNodeBuilder>::DecoratedBuilder<Autofill<<B as ExtensibleNodeBuilder>::Node, C>>
Type of builder after Autofill
decoration is applied with config C
.
sourcefn fill_gaps<C>(
self,
config: C
) -> <B as AutofillBuilderExt>::DecoratedBuilder<C> where
C: 'static + Config<Node = <B as AutofillBuilderExt>::Node>,
fn fill_gaps<C>(
self,
config: C
) -> <B as AutofillBuilderExt>::DecoratedBuilder<C> where
C: 'static + Config<Node = <B as AutofillBuilderExt>::Node>,
Decorates the node with Autofill
using the given configuration.
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<I, B> DelegateBuilderExt<I> for B where
I: 'static,
B: ExtensibleNodeBuilder,
<B as ExtensibleNodeBuilder>::Node: 'static,
<B as ExtensibleNodeBuilder>::Node: LeadershipAwareNode<I>,
impl<I, B> DelegateBuilderExt<I> for B where
I: 'static,
B: ExtensibleNodeBuilder,
<B as ExtensibleNodeBuilder>::Node: 'static,
<B as ExtensibleNodeBuilder>::Node: LeadershipAwareNode<I>,
type Node = <B as ExtensibleNodeBuilder>::Node
type Node = <B as ExtensibleNodeBuilder>::Node
Node type to be decorated.
type DecoratedBuilder = <B as ExtensibleNodeBuilder>::DecoratedBuilder<Delegate<<B as ExtensibleNodeBuilder>::Node, C, I>>
sourcefn delegate<C>(
self,
config: C
) -> <B as DelegateBuilderExt<I>>::DecoratedBuilder<C> where
C: 'static + Config<Node = <B as DelegateBuilderExt<I>>::Node>,
fn delegate<C>(
self,
config: C
) -> <B as DelegateBuilderExt<I>>::DecoratedBuilder<C> where
C: 'static + Config<Node = <B as DelegateBuilderExt<I>>::Node>,
Decorates the node with Delegate
using the given configuration.
sourceimpl<B> EnsureLeadershipBuilderExt for B where
B: ExtensibleNodeBuilder,
<B as ExtensibleNodeBuilder>::Node: 'static,
<B as ExtensibleNodeBuilder>::Node: NodeImpl,
impl<B> EnsureLeadershipBuilderExt for B where
B: ExtensibleNodeBuilder,
<B as ExtensibleNodeBuilder>::Node: 'static,
<B as ExtensibleNodeBuilder>::Node: NodeImpl,
type Node = <B as ExtensibleNodeBuilder>::Node
type DecoratedBuilder = <B as ExtensibleNodeBuilder>::DecoratedBuilder<EnsureLeadership<<B as ExtensibleNodeBuilder>::Node, C>>
fn ensure_leadership<C>(
self,
config: C
) -> <B as EnsureLeadershipBuilderExt>::DecoratedBuilder<C> where
C: 'static + Config<Node = <B as EnsureLeadershipBuilderExt>::Node>,
sourceimpl<I, B> HeartbeatsBuilderExt<I> for B where
I: 'static,
B: ExtensibleNodeBuilder,
<B as ExtensibleNodeBuilder>::Node: 'static,
<B as ExtensibleNodeBuilder>::Node: MaybeLeadershipAwareNode<I>,
impl<I, B> HeartbeatsBuilderExt<I> for B where
I: 'static,
B: ExtensibleNodeBuilder,
<B as ExtensibleNodeBuilder>::Node: 'static,
<B as ExtensibleNodeBuilder>::Node: MaybeLeadershipAwareNode<I>,
type Node = <B as ExtensibleNodeBuilder>::Node
type Node = <B as ExtensibleNodeBuilder>::Node
Type of node to be decorated.
type DecoratedBuilder = <B as ExtensibleNodeBuilder>::DecoratedBuilder<Heartbeats<<B as ExtensibleNodeBuilder>::Node, C, I>>
type DecoratedBuilder = <B as ExtensibleNodeBuilder>::DecoratedBuilder<Heartbeats<<B as ExtensibleNodeBuilder>::Node, C, I>>
Type of builder after Heartbeats
decoration is applied with config
C
. Read more
sourcefn send_heartbeats<C>(
self,
config: C
) -> <B as HeartbeatsBuilderExt<I>>::DecoratedBuilder<C> where
C: 'static + Config<Node = <B as HeartbeatsBuilderExt<I>>::Node>,
fn send_heartbeats<C>(
self,
config: C
) -> <B as HeartbeatsBuilderExt<I>>::DecoratedBuilder<C> where
C: 'static + Config<Node = <B as HeartbeatsBuilderExt<I>>::Node>,
Decorates the node with Heartbeats
using the given configuration.
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<B> MasterLeasesBuilderExt for B where
B: ExtensibleNodeBuilder,
<B as ExtensibleNodeBuilder>::Node: 'static,
<B as ExtensibleNodeBuilder>::Node: NodeImpl,
impl<B> MasterLeasesBuilderExt for B where
B: ExtensibleNodeBuilder,
<B as ExtensibleNodeBuilder>::Node: 'static,
<B as ExtensibleNodeBuilder>::Node: NodeImpl,
type Node = <B as ExtensibleNodeBuilder>::Node
type DecoratedBuilder = <B as ExtensibleNodeBuilder>::DecoratedBuilder<MasterLeases<<B as ExtensibleNodeBuilder>::Node, C>>
fn maintain_master_lease<C>(
self,
communicator_subscription: Subscription<<<<<<B as MasterLeasesBuilderExt>::Node as Node>::Invocation as Invocation>::State as State>::Node as NodeInfo>::Id>,
voter_subscription: Subscription<<<<<<B as MasterLeasesBuilderExt>::Node as Node>::Invocation as Invocation>::State as State>::Node as NodeInfo>::Id>,
config: C
) -> <B as MasterLeasesBuilderExt>::DecoratedBuilder<C> where
C: 'static + Config<Node = <B as MasterLeasesBuilderExt>::Node>,
sourceimpl<B> TrackLeadershipBuilderExt for B where
B: ExtensibleNodeBuilder,
<B as ExtensibleNodeBuilder>::Node: 'static,
<B as ExtensibleNodeBuilder>::Node: NodeImpl,
impl<B> TrackLeadershipBuilderExt for B where
B: ExtensibleNodeBuilder,
<B as ExtensibleNodeBuilder>::Node: 'static,
<B as ExtensibleNodeBuilder>::Node: NodeImpl,
type Node = <B as ExtensibleNodeBuilder>::Node
type DecoratedBuilder = <B as ExtensibleNodeBuilder>::DecoratedBuilder<TrackLeadership<<B as ExtensibleNodeBuilder>::Node>>
fn track_leadership(self) -> <B as TrackLeadershipBuilderExt>::DecoratedBuilder
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