Skip to main content

OnlyLatest

Trait OnlyLatest 

Source
pub trait OnlyLatest<N, Incoming, Outgoing, Error>:
    Transport<Incoming, Outgoing, Error>
    + Sized
    + Unpin
where Error: Error,
{ // Provided method fn only_latest(self) -> Latest<Self, Error, N, Incoming, Outgoing> where Incoming: Number<Output = N>, for<'a> &'a N: PartialOrd { ... } }
Available on crate feature latest only.
Expand description

Trait for requesting only the most recent messages.

Provided Methods§

Source

fn only_latest(self) -> Latest<Self, Error, N, Incoming, Outgoing>
where Incoming: Number<Output = N>, for<'a> &'a N: PartialOrd,

Wrap transport with Latest transport turning it into transport returning latest message when polling it for the next received message.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, N, Incoming, Outgoing, Error> OnlyLatest<N, Incoming, Outgoing, Error> for T
where T: Transport<Incoming, Outgoing, Error> + Unpin, Error: Error,