pub struct FakeJournalStore { /* private fields */ }Expand description
In-memory fake journal store fixture for SDK conformance tests. Use it to script deterministic behavior in memory; any transcript or endpoint mutation is documented on the method that performs it.
Implementations§
Source§impl FakeJournalStore
impl FakeJournalStore
Sourcepub fn records(&self) -> Vec<JournalRecord>
pub fn records(&self) -> Vec<JournalRecord>
Returns the records currently held by this value. This configures deterministic in-memory test state only.
Sourcepub fn normalized_records(&self) -> Vec<Value>
pub fn normalized_records(&self) -> Vec<Value>
Returns the normalized records currently held by this value. This reads deterministic in-memory test state and performs no external I/O.
Sourcepub fn fail_next_append(&self, message: impl Into<String>)
pub fn fail_next_append(&self, message: impl Into<String>)
Fail next append. This reads or mutates deterministic in-memory test state unless the method explicitly names a fixture file.
Trait Implementations§
Source§impl Clone for FakeJournalStore
impl Clone for FakeJournalStore
Source§fn clone(&self) -> FakeJournalStore
fn clone(&self) -> FakeJournalStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FakeJournalStore
impl Debug for FakeJournalStore
Source§impl Default for FakeJournalStore
impl Default for FakeJournalStore
Source§fn default() -> FakeJournalStore
fn default() -> FakeJournalStore
Returns the “default value” for a type. Read more
Source§impl RunJournal for FakeJournalStore
impl RunJournal for FakeJournalStore
Source§fn append(&self, record: JournalRecord) -> Result<JournalCursor, AgentError>
fn append(&self, record: JournalRecord) -> Result<JournalCursor, AgentError>
Appends one durable journal record and returns its cursor.
Implementations append one durable journal record and return its cursor; they must not
execute the effect described by the record.
Auto Trait Implementations§
impl Freeze for FakeJournalStore
impl RefUnwindSafe for FakeJournalStore
impl Send for FakeJournalStore
impl Sync for FakeJournalStore
impl Unpin for FakeJournalStore
impl UnsafeUnpin for FakeJournalStore
impl UnwindSafe for FakeJournalStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more