Thalweg · API reference ← Main docs

InMemoryCoverage

Struct InMemoryCoverage 

Source
pub struct InMemoryCoverage { /* private fields */ }
Expand description

A pod-local, in-memory coverage store. Real deployments back this with a durable store colocated with raw (ADR-0053); this is the local write-behind tier and the test/reference implementation. Union-merge semantics are the same regardless of backing.

Implementations§

Source§

impl InMemoryCoverage

Source

pub fn new() -> Self

A fresh, empty store.

Trait Implementations§

Source§

impl CoverageStore for InMemoryCoverage

Source§

fn record<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, sink: &'life1 SinkId, span: &'life2 OffsetSpan, ) -> Pin<Box<dyn Future<Output = Result<(), CoverageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Record that span was durably written by sink. Merges by union with existing coverage; overlapping/adjacent ranges coalesce. Idempotent. Read more
Source§

fn covered<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, sink: &'life1 SinkId, topic: &'life2 str, partition: i32, ) -> Pin<Box<dyn Future<Output = Result<Vec<CoveredRange>, CoverageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

The union-merged covered ranges for (sink, topic, partition), ordered by start. Read more
Source§

fn gaps<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, sink: &'life1 SinkId, topic: &'life2 str, partition: i32, up_to: i64, ) -> Pin<Box<dyn Future<Output = Result<Vec<CoveredRange>, CoverageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

The gaps in [0, up_to) not yet covered for (sink, topic, partition) — the windows recovery must replay. Read more
Source§

impl Debug for InMemoryCoverage

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for InMemoryCoverage

Source§

fn default() -> InMemoryCoverage

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,