Skip to main content

DataPlane

Trait DataPlane 

Source
pub trait DataPlane: Send + Sync {
    // Required methods
    fn query<'life0, 'life1, 'async_trait>(
        &'life0 self,
        query: &'life1 Query,
    ) -> Pin<Box<dyn Future<Output = Result<Page, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn subscribe(
        &self,
        from: Revision,
    ) -> Pin<Box<dyn Stream<Item = RowPatch> + Send>>;
}
Expand description

The data plane exposed to every frontend.

Object-safe (Box<dyn DataPlane>), async, fallible, and streaming — matching ADR-0002 (browser → servekaptein-core) and the unified error enum.

Required Methods§

Source

fn query<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 Query, ) -> Pin<Box<dyn Future<Output = Result<Page, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Execute a lazy query and return a bounded page.

Source

fn subscribe( &self, from: Revision, ) -> Pin<Box<dyn Stream<Item = RowPatch> + Send>>

Subscribe to deltas from the given revision onward.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§