Struct paxakos::node_builder::NodeBuilder [−][src]
pub struct NodeBuilder<N: Node, V = IndiscriminateVoterFor<N>, B = InMemoryBuffer<RoundNumOf<N>, CoordNumOf<N>, LogEntryOf<N>>> { /* fields omitted */ }
Expand description
Node builder with all essential information set.
Implementations
impl<N, V, B> NodeBuilder<N, V, B> where
N: NodeImpl + 'static,
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>>,
impl<N, V, B> NodeBuilder<N, V, B> where
N: NodeImpl + 'static,
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>>,
pub fn buffering_applied_entries_in<T: Buffer<RoundNum = RoundNumOf<N>, CoordNum = CoordNumOf<N>, Entry = LogEntryOf<N>>>(
self,
buffer: T
) -> NodeBuilder<N, V, T>
pub fn buffering_applied_entries_in<T: Buffer<RoundNum = RoundNumOf<N>, CoordNum = CoordNumOf<N>, Entry = LogEntryOf<N>>>(
self,
buffer: T
) -> NodeBuilder<N, V, T>
Sets the applied entry buffer.
Tracer to record events with.
Sets the voting strategy to use.
Sets the node kit to use.
pub fn decorated_with<D>(
self,
arguments: <D as Decoration>::Arguments
) -> NodeBuilder<D, V, B> where
D: Decoration<Decorated = N, Invocation = InvocationOf<N>, Communicator = CommunicatorOf<N>>,
pub fn decorated_with<D>(
self,
arguments: <D as Decoration>::Arguments
) -> NodeBuilder<D, V, B> where
D: Decoration<Decorated = N, Invocation = InvocationOf<N>, Communicator = CommunicatorOf<N>>,
Adds a decoration to wrap around the resulting node.
pub fn spawn(
self
) -> LocalBoxFuture<'static, SpawnResult<(RequestHandlerFor<N>, Shell<N>)>> where
StateOf<N>: State<Context = ()>,
pub fn spawn(
self
) -> LocalBoxFuture<'static, SpawnResult<(RequestHandlerFor<N>, Shell<N>)>> where
StateOf<N>: State<Context = ()>,
Spawns the node into context ()
.
pub fn spawn_in(
self,
context: ContextOf<N>
) -> LocalBoxFuture<'static, SpawnResult<(RequestHandlerFor<N>, Shell<N>)>>
pub fn spawn_in(
self,
context: ContextOf<N>
) -> LocalBoxFuture<'static, SpawnResult<(RequestHandlerFor<N>, Shell<N>)>>
Spawns the node in the given context.
Trait Implementations
impl<N, V, B> AutofillBuilderExt for NodeBuilder<N, V, B> where
N: NodeImpl + 'static,
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>>,
impl<N, V, B> AutofillBuilderExt for NodeBuilder<N, V, B> where
N: NodeImpl + 'static,
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>>,
impl<N, V, B> EnsureLeadershipBuilderExt for NodeBuilder<N, V, B> where
N: NodeImpl + 'static,
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>>,
impl<N, V, B> EnsureLeadershipBuilderExt for NodeBuilder<N, V, B> where
N: NodeImpl + 'static,
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>>,
type Node = N
type Voter = V
type Buffer = B
fn ensure_leadership<C, P>(
self,
configure: C
) -> NodeBuilder<EnsureLeadership<Self::Node, P>, Self::Voter, Self::Buffer> where
C: FnOnce(EnsureLeadershipBuilderBlank<N>) -> EnsureLeadershipBuilder<N, P>,
P: Fn() -> LogEntryOf<N> + 'static,
impl<N, V, B, I> HeartbeatsBuilderExt<I> for NodeBuilder<N, V, B> where
N: NodeImpl + MaybeLeadershipAwareNode<I> + 'static,
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>>,
impl<N, V, B, I> HeartbeatsBuilderExt<I> for NodeBuilder<N, V, B> where
N: NodeImpl + MaybeLeadershipAwareNode<I> + 'static,
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>>,
type Node = N
type Node = N
Node type to be decorated.
type Voter = V
type Voter = V
Voter type.
type Buffer = B
type Buffer = B
Buffer type.
fn send_heartbeats<C>(
self,
config: C
) -> NodeBuilder<Heartbeats<Self::Node, C, I>, Self::Voter, Self::Buffer> where
C: Config<Node = Self::Node> + 'static,
fn send_heartbeats<C>(
self,
config: C
) -> NodeBuilder<Heartbeats<Self::Node, C, I>, Self::Voter, Self::Buffer> where
C: Config<Node = Self::Node> + 'static,
Decorates the node with Heartbeats
using the given configuration.
impl<N, V, B> MasterLeasesBuilderExt for NodeBuilder<N, V, B> where
N: NodeImpl + 'static,
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>>,
impl<N, V, B> MasterLeasesBuilderExt for NodeBuilder<N, V, B> where
N: NodeImpl + 'static,
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>>,
type Node = N
type Voter = V
type Buffer = B
fn maintain_master_lease<C>(
self,
communicator_subscription: Subscription<NodeIdOf<Self::Node>>,
voter_subscription: Subscription<NodeIdOf<Self::Node>>,
config: C
) -> NodeBuilder<MasterLeases<Self::Node, C>, Self::Voter, Self::Buffer> where
C: Config<Node = Self::Node> + 'static,
impl<N, V, B> ReleaserBuilderExt for NodeBuilder<N, V, B> where
N: NodeImpl + 'static,
EventOf<N>: AsLeaseEvent,
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>>,
impl<N, V, B> ReleaserBuilderExt for NodeBuilder<N, V, B> where
N: NodeImpl + 'static,
EventOf<N>: AsLeaseEvent,
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>>,
type Node = N
type Voter = V
type Buffer = B
fn release_leases<C, P>(
self,
configure: C
) -> NodeBuilder<Releaser<Self::Node, P>, Self::Voter, Self::Buffer> where
EventOf<N>: AsLeaseEvent,
C: FnOnce(ReleaserBuilderBlank<N>) -> ReleaserBuilder<N, P>,
P: Fn(<<EventOf<N> as AsLeaseEvent>::Lease as Lease>::Id) -> LogEntryOf<N> + 'static,
impl<N, V, B> TrackLeadershipBuilderExt for NodeBuilder<N, V, B> where
N: NodeImpl + 'static,
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>>,
impl<N, V, B> TrackLeadershipBuilderExt for NodeBuilder<N, V, B> where
N: NodeImpl + 'static,
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>>,
type Node = N
type Voter = V
type Buffer = B
fn track_leadership(
self
) -> NodeBuilder<TrackLeadership<Self::Node>, Self::Voter, Self::Buffer>
Auto Trait Implementations
impl<N, 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>> !RefUnwindSafe for NodeBuilder<N, V, B>
impl<N, 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>> !Send for NodeBuilder<N, V, B>
impl<N, 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>> !Sync for NodeBuilder<N, V, B>
impl<N, V, B> Unpin for NodeBuilder<N, V, B> where
B: Unpin,
V: Unpin,
<N as Node>::Communicator: Unpin,
impl<N, 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>> !UnwindSafe for NodeBuilder<N, V, B>
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more