pub struct InMemoryBackend;Expand description
No-op storage backend — all writes succeed, all loads return empty. Used when no DATABASE_URL is configured (development/testing).
Implementations§
Trait Implementations§
Source§impl StorageBackend for InMemoryBackend
impl StorageBackend for InMemoryBackend
async fn save_trace(&self, _trace: &TraceRow) -> Result<(), StorageError>
async fn load_traces( &self, _limit: usize, _offset: usize, ) -> Result<Vec<TraceRow>, StorageError>
async fn get_trace( &self, _trace_id: u64, ) -> Result<Option<TraceRow>, StorageError>
async fn delete_traces(&self, _ids: &[u64]) -> Result<u64, StorageError>
async fn save_session(&self, _entry: &SessionRow) -> Result<(), StorageError>
async fn load_sessions( &self, _scope: &str, ) -> Result<Vec<SessionRow>, StorageError>
async fn delete_session( &self, _scope: &str, _key: &str, ) -> Result<bool, StorageError>
async fn save_daemon(&self, _daemon: &DaemonRow) -> Result<(), StorageError>
async fn load_daemons(&self) -> Result<Vec<DaemonRow>, StorageError>
async fn delete_daemon(&self, _name: &str) -> Result<bool, StorageError>
async fn append_audit(&self, _entry: &AuditRow) -> Result<(), StorageError>
async fn query_audit( &self, _limit: usize, ) -> Result<Vec<AuditRow>, StorageError>
async fn save_axon_store( &self, _store: &AxonStoreRow, ) -> Result<(), StorageError>
async fn load_axon_stores(&self) -> Result<Vec<AxonStoreRow>, StorageError>
async fn delete_axon_store(&self, _name: &str) -> Result<bool, StorageError>
async fn save_dataspace(&self, _ds: &DataspaceRow) -> Result<(), StorageError>
async fn load_dataspaces(&self) -> Result<Vec<DataspaceRow>, StorageError>
async fn delete_dataspace(&self, _name: &str) -> Result<bool, StorageError>
async fn save_hibernation( &self, _session: &HibernationRow, ) -> Result<(), StorageError>
async fn load_hibernations(&self) -> Result<Vec<HibernationRow>, StorageError>
async fn append_event(&self, _event: &EventRow) -> Result<(), StorageError>
async fn query_events( &self, _topic: Option<&str>, _limit: usize, ) -> Result<Vec<EventRow>, StorageError>
async fn save_cache_entry(&self, _entry: &CacheRow) -> Result<(), StorageError>
async fn load_cache_entries(&self) -> Result<Vec<CacheRow>, StorageError>
async fn evict_expired_cache(&self) -> Result<u64, StorageError>
async fn record_cost(&self, _cost: &CostRow) -> Result<(), StorageError>
async fn query_costs( &self, _flow: Option<&str>, _limit: usize, ) -> Result<Vec<CostRow>, StorageError>
async fn save_schedule( &self, _schedule: &ScheduleRow, ) -> Result<(), StorageError>
async fn load_schedules(&self) -> Result<Vec<ScheduleRow>, StorageError>
async fn delete_schedule(&self, _name: &str) -> Result<bool, StorageError>
async fn is_healthy(&self) -> bool
Auto Trait Implementations§
impl Freeze for InMemoryBackend
impl RefUnwindSafe for InMemoryBackend
impl Send for InMemoryBackend
impl Sync for InMemoryBackend
impl Unpin for InMemoryBackend
impl UnsafeUnpin for InMemoryBackend
impl UnwindSafe for InMemoryBackend
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
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 moreCreates a shared type from an unshared type.