Skip to main content

RingFrameSource

Trait RingFrameSource 

Source
pub trait RingFrameSource {
    // Required methods
    fn kind(&self) -> u8;
    fn head(&self) -> u64;
    fn capacity(&self) -> usize;
    fn read_at(&self, counter: u64) -> Option<Frame>;
}
Expand description

Read-only source that can be walked by super::RingCursor.

Implementors expose only the ring facts needed by the generic walker: the ring kind, current head, fixed capacity, and counter-addressed frame reads.

Required Methods§

Source

fn kind(&self) -> u8

The OrbitTyped::KIND carried by this ring.

Source

fn head(&self) -> u64

Monotonic write head: number of writes ever published.

Source

fn capacity(&self) -> usize

Fixed slot count for this ring.

Source

fn read_at(&self, counter: u64) -> Option<Frame>

Read the frame currently occupying counter % capacity.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl RingFrameSource for ShmRing

Available on Unix only.
Source§

impl RingFrameSource for Ring