Skip to main content

EngineClient

Trait EngineClient 

Source
pub trait EngineClient {
    // Required methods
    fn observe_many(
        &mut self,
        files: &[FileBytes],
    ) -> Result<Vec<ObserveOutcome>>;
    fn observe_delete(&mut self, path: &str) -> Result<DeleteOutcome>;
    fn changes_since(
        &mut self,
        cursor: i64,
        limit: Option<usize>,
        origin: Option<&str>,
    ) -> Result<ChangesPage>;
    fn read_doc(&mut self, path: &str) -> Result<Option<DocBytes>>;

    // Provided method
    fn close(&mut self) -> Result<()> { ... }
}
Expand description

Everything the reconcile loop needs from the engine.

Required Methods§

Source

fn observe_many(&mut self, files: &[FileBytes]) -> Result<Vec<ObserveOutcome>>

Observe whole-file bytes as observed commits (echo-suppressed engine-side), one batch, then sweep the pool.

Source

fn observe_delete(&mut self, path: &str) -> Result<DeleteOutcome>

Mirror a source-side deletion (tombstone, then sweep).

Source

fn changes_since( &mut self, cursor: i64, limit: Option<usize>, origin: Option<&str>, ) -> Result<ChangesPage>

The repo’s change feed after cursor (§6).

Source

fn read_doc(&mut self, path: &str) -> Result<Option<DocBytes>>

The current bytes at path, or None when no live doc reads there.

Provided Methods§

Source

fn close(&mut self) -> Result<()>

Release the connection (the store’s lifetime is the caller’s).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§