pub struct Memory { /* private fields */ }Implementations§
Source§impl Memory
impl Memory
pub fn new() -> Self
Sourcepub fn fork(&self) -> Result<Self, StorageError>
pub fn fork(&self) -> Result<Self, StorageError>
Forks the current in-memory state without serializing it.
This is primarily useful for tests and benchmarks that need an isolated
Memory instance. Portable Lix snapshots are exported from crate::Lix.
Trait Implementations§
Source§impl Storage for Memory
impl Storage for Memory
type Read<'a> = MemoryRead where Self: 'a
type Write<'a> = MemoryWrite where Self: 'a
Source§async fn acquire_session(&self) -> Result<StorageSessionToken, StorageError>
async fn acquire_session(&self) -> Result<StorageSessionToken, StorageError>
Acquires the storage’s current fenced generation. Read more
Source§async fn acquire_partial_replica_owner(
&self,
token: StorageSessionToken,
) -> Result<StorageOwnerLease, StorageError>
async fn acquire_partial_replica_owner( &self, token: StorageSessionToken, ) -> Result<StorageOwnerLease, StorageError>
Acquires exclusive partial-engine ownership of this physical store.
Unsupported stores must refuse partial opening; ordinary sessions are unchanged.
async fn begin_read( &self, opts: ReadOptions, ) -> Result<Self::Read<'_>, StorageError>
Source§async fn begin_write(
&self,
opts: WriteOptions,
) -> Result<Self::Write<'_>, StorageError>
async fn begin_write( &self, opts: WriteOptions, ) -> Result<Self::Write<'_>, StorageError>
Opens one storage-owned write transaction. Read more
Exclusively owns replica publication and retirement for this physical authority.
Cloned leases may share the owner; independent servers must be refused.
Backends with one physical engine owner can reuse partial-owner exclusion.
Source§fn watch_for_changes(
&self,
) -> impl Future<Output = Result<StorageChangeWatch, StorageError>> + Send
fn watch_for_changes( &self, ) -> impl Future<Output = Result<StorageChangeWatch, StorageError>> + Send
Opens a watch for committed changes to the underlying storage. Read more
Auto Trait Implementations§
impl Freeze for Memory
impl RefUnwindSafe for Memory
impl Send for Memory
impl Sync for Memory
impl Unpin for Memory
impl UnsafeUnpin for Memory
impl UnwindSafe for Memory
Blanket Implementations§
impl<T> Allocation for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more