Struct paxakos::RequestHandler
source · [−]pub struct RequestHandler<I: Invocation>(_);
Expand description
Used by Communicator
s to prepare
replies.
Implementations
sourceimpl<I: Invocation> RequestHandler<I>
impl<I: Invocation> RequestHandler<I>
sourcepub fn handle_prepare(
&self,
round_num: RoundNumOf<I>,
coord_num: CoordNumOf<I>
) -> impl Future<Output = Result<PromiseFor<I>, PrepareError<I>>>
pub fn handle_prepare(
&self,
round_num: RoundNumOf<I>,
coord_num: CoordNumOf<I>
) -> impl Future<Output = Result<PromiseFor<I>, PrepareError<I>>>
Asks this node to answer a send_prepare
sent by another node.
sourcepub fn handle_proposal<E: Into<Arc<LogEntryOf<I>>>>(
&self,
round_num: RoundNumOf<I>,
coord_num: CoordNumOf<I>,
entry: E
) -> impl Future<Output = Result<YeaOf<I>, AcceptError<I>>>
pub fn handle_proposal<E: Into<Arc<LogEntryOf<I>>>>(
&self,
round_num: RoundNumOf<I>,
coord_num: CoordNumOf<I>,
entry: E
) -> impl Future<Output = Result<YeaOf<I>, AcceptError<I>>>
Asks this node to answer a send_proposal
sent by another node.
sourcepub fn handle_commit<E: Into<Arc<LogEntryOf<I>>>>(
&self,
round_num: RoundNumOf<I>,
coord_num: CoordNumOf<I>,
entry: E
) -> impl Future<Output = Result<(), CommitError<I>>>
pub fn handle_commit<E: Into<Arc<LogEntryOf<I>>>>(
&self,
round_num: RoundNumOf<I>,
coord_num: CoordNumOf<I>,
entry: E
) -> impl Future<Output = Result<(), CommitError<I>>>
Asks this node to commit the given log entry for the given round number.
sourcepub fn handle_commit_by_id(
&self,
round_num: RoundNumOf<I>,
coord_num: CoordNumOf<I>,
entry_id: LogEntryIdOf<I>
) -> impl Future<Output = Result<(), CommitError<I>>>
pub fn handle_commit_by_id(
&self,
round_num: RoundNumOf<I>,
coord_num: CoordNumOf<I>,
entry_id: LogEntryIdOf<I>
) -> impl Future<Output = Result<(), CommitError<I>>>
Asks this node to answer a send_commit_by_id
sent by another node.
Trait Implementations
sourceimpl<I: Debug + Invocation> Debug for RequestHandler<I>
impl<I: Debug + Invocation> Debug for RequestHandler<I>
Auto Trait Implementations
impl<I> !RefUnwindSafe for RequestHandler<I>
impl<I> Send for RequestHandler<I>
impl<I> Sync for RequestHandler<I>
impl<I> Unpin for RequestHandler<I>
impl<I> !UnwindSafe for RequestHandler<I>
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