Trait toad::step::retry::Buf

source ·
pub trait Buf<P>where
    P: PlatformTypes,
    Self: Array<Item = (State<P::Clock>, Addrd<Message<P>>)>,{
    // Provided methods
    fn debug(
        now: Instant<P::Clock>,
        state: &State<P::Clock>,
        msg: &Addrd<Message<P>>
    ) -> Debug { ... }
    fn attempt_all<E>(
        &mut self,
        now: Instant<P::Clock>,
        effects: &mut P::Effects
    ) -> Result<(), Error<E>> { ... }
    fn forget(
        &mut self,
        now: Instant<P::Clock>,
        effects: &mut P::Effects,
        token: Token
    ) { ... }
    fn mark_acked(
        &mut self,
        now: Instant<P::Clock>,
        effects: &mut P::Effects,
        token: Token
    ) { ... }
    fn mark_reset(
        &mut self,
        now: Instant<P::Clock>,
        effects: &mut P::Effects,
        token: Token
    ) { ... }
    fn maybe_seen_response<E>(
        &mut self,
        now: Instant<P::Clock>,
        effects: &mut P::Effects,
        msg: Addrd<&Message<P>>
    ) -> Result<(), Error<E>> { ... }
    fn store_retryables<E>(
        &mut self,
        now: Instant<P::Clock>,
        effects: &mut P::Effects,
        msg: &Addrd<Message<P>>,
        config: Config
    ) -> Result<(), Error<E>> { ... }
}
Expand description

Buffer used to store messages queued for retry

Provided Methods§

source

fn debug( now: Instant<P::Clock>, state: &State<P::Clock>, msg: &Addrd<Message<P>> ) -> Debug

Data points used by log messaging

source

fn attempt_all<E>( &mut self, now: Instant<P::Clock>, effects: &mut P::Effects ) -> Result<(), Error<E>>

Send all messages that need to be sent

source

fn forget( &mut self, now: Instant<P::Clock>, effects: &mut P::Effects, token: Token )

We saw a response and should remove all tracking of a token (if we have any)

source

fn mark_acked( &mut self, now: Instant<P::Clock>, effects: &mut P::Effects, token: Token )

We saw an ACK and should transition the retry state for matching outbound CONs to the “acked” state

source

fn mark_reset( &mut self, now: Instant<P::Clock>, effects: &mut P::Effects, token: Token )

We saw a RESET regarding token token

source

fn maybe_seen_response<E>( &mut self, now: Instant<P::Clock>, effects: &mut P::Effects, msg: Addrd<&Message<P>> ) -> Result<(), Error<E>>

Called when a response of any kind to any request is received

May invoke mark_acked & forget

source

fn store_retryables<E>( &mut self, now: Instant<P::Clock>, effects: &mut P::Effects, msg: &Addrd<Message<P>>, config: Config ) -> Result<(), Error<E>>

Called when a message of any kind is sent, and may store it to be retried in the future

Implementors§

source§

impl<T, P> Buf<P> for Twhere T: Array<Item = (State<P::Clock>, Addrd<Message<P>>)>, P: PlatformTypes,