pub struct MemoryPersistence;Expand description
In-memory SchedulerPersistence backend. Always returns an empty
load_all; every other call is a no-op.
Used by tests and as the default backend when the host has not yet
wired a durable backend (e.g., during early Uni::build before the
storage manager is available).
Trait Implementations§
Source§impl Debug for MemoryPersistence
impl Debug for MemoryPersistence
Source§impl Default for MemoryPersistence
impl Default for MemoryPersistence
Source§fn default() -> MemoryPersistence
fn default() -> MemoryPersistence
Returns the “default value” for a type. Read more
Source§impl SchedulerPersistence for MemoryPersistence
impl SchedulerPersistence for MemoryPersistence
Source§fn record_started(
&self,
_id: &QName,
_started_at: SystemTime,
) -> Result<(), SchedulerPersistenceError>
fn record_started( &self, _id: &QName, _started_at: SystemTime, ) -> Result<(), SchedulerPersistenceError>
Persist a job’s transition into a new run. Read more
Source§fn record_finished(
&self,
_id: &QName,
_finished_at: SystemTime,
_success: bool,
) -> Result<(), SchedulerPersistenceError>
fn record_finished( &self, _id: &QName, _finished_at: SystemTime, _success: bool, ) -> Result<(), SchedulerPersistenceError>
Persist the outcome of a finished run. Read more
Source§fn cancel(&self, _id: &QName) -> Result<(), SchedulerPersistenceError>
fn cancel(&self, _id: &QName) -> Result<(), SchedulerPersistenceError>
Persist a cancellation. Read more
Source§fn load_all(&self) -> Result<Vec<SchedulerJobRecord>, SchedulerPersistenceError>
fn load_all(&self) -> Result<Vec<SchedulerJobRecord>, SchedulerPersistenceError>
Reload all known job records (used on host startup to restore
scheduler state across restart). Order is unspecified — the
driver re-registers them in any order. Read more
Source§fn record_scheduled(
&self,
_id: &QName,
_schedule: &Schedule,
) -> Result<(), SchedulerPersistenceError>
fn record_scheduled( &self, _id: &QName, _schedule: &Schedule, ) -> Result<(), SchedulerPersistenceError>
Persist a job’s schedule at registration time. Read more
Source§fn flush_checkpoint(&self) -> Result<(), SchedulerPersistenceError>
fn flush_checkpoint(&self) -> Result<(), SchedulerPersistenceError>
Force any in-memory buffers to durable storage. Read more
Auto Trait Implementations§
impl Freeze for MemoryPersistence
impl RefUnwindSafe for MemoryPersistence
impl Send for MemoryPersistence
impl Sync for MemoryPersistence
impl Unpin for MemoryPersistence
impl UnsafeUnpin for MemoryPersistence
impl UnwindSafe for MemoryPersistence
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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