Skip to main content

InProcessEngineClient

Struct InProcessEngineClient 

Source
pub struct InProcessEngineClient<'a> { /* private fields */ }
Expand description

The in-process client over an open store: each call is timestamped by clock (the wall clock by default; a fixture pins it).

Implementations§

Source§

impl<'a> InProcessEngineClient<'a>

Source

pub fn new(store: &'a mut Store, repo_id: &str) -> Self

Source

pub fn with_config(self, config: Config) -> Self

The matcher thresholds every observe uses.

Source

pub fn with_clock(self, clock: impl FnMut() -> String + 'a) -> Self

Replace the wall clock.

Source

pub fn at(self, ts: &str) -> Self

Every call at one fixed timestamp.

Source

pub fn store(&self) -> &Store

Source

pub fn repo_id(&self) -> &str

Trait Implementations§

Source§

impl Debug for InProcessEngineClient<'_>

Source§

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

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

impl EngineClient for InProcessEngineClient<'_>

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.
Source§

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

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

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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.