pub trait SenderQueueableMessage {
type Epoch: EpochT;
// Required methods
fn is_premature(&self, them: Self::Epoch, max_future_epochs: u64) -> bool;
fn is_obsolete(&self, them: Self::Epoch) -> bool;
fn first_epoch(&self) -> Self::Epoch;
// Provided method
fn is_accepted(&self, them: Self::Epoch, max_future_epochs: u64) -> bool { ... }
}Expand description
A message type that is suitable for use with a sender queue.
Required Associated Types§
Required Methods§
Sourcefn is_premature(&self, them: Self::Epoch, max_future_epochs: u64) -> bool
fn is_premature(&self, them: Self::Epoch, max_future_epochs: u64) -> bool
Whether the message needs to be deferred.
Sourcefn is_obsolete(&self, them: Self::Epoch) -> bool
fn is_obsolete(&self, them: Self::Epoch) -> bool
Whether the epoch of the message is behind them.
Sourcefn first_epoch(&self) -> Self::Epoch
fn first_epoch(&self) -> Self::Epoch
Returns the earliest epoch in which this message can be handled.
Provided Methods§
Sourcefn is_accepted(&self, them: Self::Epoch, max_future_epochs: u64) -> bool
fn is_accepted(&self, them: Self::Epoch, max_future_epochs: u64) -> bool
Whether the message is neither obsolete nor premature.