Skip to main content

MemorySyncFixture

Struct MemorySyncFixture 

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

The reference SyncFixture, over [MemorySyncPeer].

Every rule is proven against this before it is allowed to fail an adapter: a rule red here is a wrong rule, not a wrong peer. Each instance owns one in-memory peer and each connect is a new handle onto it.

Implementations§

Source§

impl MemorySyncFixture

Source

pub fn new() -> Self

A fixture over a fresh in-memory peer with the minimum conformant limits.

Trait Implementations§

Source§

impl Clone for MemorySyncFixture

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MemorySyncFixture

Source§

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

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

impl Default for MemorySyncFixture

Source§

fn default() -> Self

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

impl SyncFixture for MemorySyncFixture

Source§

const REOPEN: Capability

Declined, by incapacity: the reference peer’s log is process memory, so a reopen would read back nothing or everything, never what was durable. tests/wrong_reopens.rs proves the rule’s reopen half instead.

Source§

async fn refusals(&self, peer: &Self::Peer) -> RefusalsOf<Self::Peer>

The one refusal the reference peer can be driven into from outside.

[MemoryPeerError::Poisoned] is its other, and provoking it takes a thread that panics while holding the peer’s lock: not something a fixture should do to the peer a suite is about to use.

Source§

async fn compact_recorded_before( &self, peer: &Self::Peer, cutoff: RecordedAt, ) -> Result<(), Violation>

[MemorySyncPeer::compact_recorded_before] on the peer behind peer.

Source§

const COMPACTION: Capability = Capability::SUPPORTED

Whether this fixture can make its peer forget a prefix of its log, as a peer with a retention window does. SY-32’s rule, retention_gap_is_reported_not_silent, needs it, and reports Skipped with the stated reason when it is declined. Read more
Source§

type Peer = MemorySyncHandle

The peer adapter under test.
Source§

async fn connect(&self) -> Self::Peer

A handle onto this fixture’s backing peer.
Source§

fn reopen(&self) -> impl Future<Output = Reopened>

Closes and reopens the backing peer, discarding every outstanding handle’s process-level state, and says whether it did. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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.

§

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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