Skip to main content

MemoryRestoreFixture

Struct MemoryRestoreFixture 

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

The reference RestoreFixture: a [StoreSyncPeer] over a [MemoryIngestStore].

The in-memory peer that issues identities of its own. MemorySyncPeer issues none, so it is not this family’s reference; a store peer over the in-memory oracle is the far side every networked peer in this workspace stands in front of.

§How it restores

A backup reads the store’s write groups whole: every event with its identity, its recorded time and its group’s guard. A restore builds a fresh [MemoryIngestStore], with an incarnation of its own, and ingests the backed-up groups into it. Ingest keeps an origin’s identity and time (VT-5, VT-9), so the restored log holds every backed-up event as it was, at the positions it held; the fresh incarnation is the re-mint. The in-memory store can do no other: it refuses a claim on its own identity it does not hold (SY-38), so a restore under the old identity cannot be built from its public API at all.

Implementations§

Source§

impl MemoryRestoreFixture

Source

pub fn new() -> Self

A fixture over a fresh in-memory store.

Trait Implementations§

Source§

impl Debug for MemoryRestoreFixture

Source§

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

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

impl Default for MemoryRestoreFixture

Source§

fn default() -> Self

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

impl RestoreFixture for MemoryRestoreFixture

Source§

type Peer = StoreSyncPeer<MemoryIngestHandle, MemoryIngestHandle>

The peer adapter under test.
Source§

fn connect(&self) -> impl Future<Output = Self::Peer>

A fresh peer onto this fixture’s store, as a process started now would open one. Read more
Source§

async fn append_local(&self, events: &[Event]) -> Result<(), Violation>

Appends events to the store as one local write, as the store’s own writer would: each event takes an identity the store mints. Read more
Source§

async fn back_up(&self) -> Result<(), Violation>

Takes a backup of the store’s storage as it stands now: everything a point-in-time restore to this moment would bring back, the store’s identity among it. Read more
Source§

async fn restore(&self) -> Result<(), Violation>

Puts the store’s storage back to the last back_up, as an operator’s restore would, and then takes every step the adapter documents a deployment must take after a restore. 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
§

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,

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.

§

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

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V