Skip to main content

LatestSource

Trait LatestSource 

Source
pub trait LatestSource<T> {
    // Required method
    fn try_take_latest(&mut self) -> Option<LatestItem<T>>;
}
Expand description

Take the latest complete state together with generation and gap evidence.

This is deliberately distinct from FIFO-oriented Source.

Required Methods§

Source

fn try_take_latest(&mut self) -> Option<LatestItem<T>>

Claim the newest unread publication, or return None when empty.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T: Copy> LatestSource<T> for Consumer<'_, T>