Skip to main content

InMemoryBackend

Struct InMemoryBackend 

Source
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§

Source§

impl InMemoryBackend

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl StorageBackend for InMemoryBackend

Source§

async fn save_trace(&self, _trace: &TraceRow) -> Result<(), StorageError>

Source§

async fn load_traces( &self, _limit: usize, _offset: usize, ) -> Result<Vec<TraceRow>, StorageError>

Source§

async fn get_trace( &self, _trace_id: u64, ) -> Result<Option<TraceRow>, StorageError>

Source§

async fn delete_traces(&self, _ids: &[u64]) -> Result<u64, StorageError>

Source§

async fn save_session(&self, _entry: &SessionRow) -> Result<(), StorageError>

Source§

async fn load_sessions( &self, _scope: &str, ) -> Result<Vec<SessionRow>, StorageError>

Source§

async fn delete_session( &self, _scope: &str, _key: &str, ) -> Result<bool, StorageError>

Source§

async fn save_daemon(&self, _daemon: &DaemonRow) -> Result<(), StorageError>

Source§

async fn load_daemons(&self) -> Result<Vec<DaemonRow>, StorageError>

Source§

async fn delete_daemon(&self, _name: &str) -> Result<bool, StorageError>

Source§

async fn append_audit(&self, _entry: &AuditRow) -> Result<(), StorageError>

Source§

async fn query_audit( &self, _limit: usize, ) -> Result<Vec<AuditRow>, StorageError>

Source§

async fn save_axon_store( &self, _store: &AxonStoreRow, ) -> Result<(), StorageError>

Source§

async fn load_axon_stores(&self) -> Result<Vec<AxonStoreRow>, StorageError>

Source§

async fn delete_axon_store(&self, _name: &str) -> Result<bool, StorageError>

Source§

async fn save_dataspace(&self, _ds: &DataspaceRow) -> Result<(), StorageError>

Source§

async fn load_dataspaces(&self) -> Result<Vec<DataspaceRow>, StorageError>

Source§

async fn delete_dataspace(&self, _name: &str) -> Result<bool, StorageError>

Source§

async fn save_hibernation( &self, _session: &HibernationRow, ) -> Result<(), StorageError>

Source§

async fn load_hibernations(&self) -> Result<Vec<HibernationRow>, StorageError>

Source§

async fn append_event(&self, _event: &EventRow) -> Result<(), StorageError>

Source§

async fn query_events( &self, _topic: Option<&str>, _limit: usize, ) -> Result<Vec<EventRow>, StorageError>

Source§

async fn save_cache_entry(&self, _entry: &CacheRow) -> Result<(), StorageError>

Source§

async fn load_cache_entries(&self) -> Result<Vec<CacheRow>, StorageError>

Source§

async fn evict_expired_cache(&self) -> Result<u64, StorageError>

Source§

async fn record_cost(&self, _cost: &CostRow) -> Result<(), StorageError>

Source§

async fn query_costs( &self, _flow: Option<&str>, _limit: usize, ) -> Result<Vec<CostRow>, StorageError>

Source§

async fn save_schedule( &self, _schedule: &ScheduleRow, ) -> Result<(), StorageError>

Source§

async fn load_schedules(&self) -> Result<Vec<ScheduleRow>, StorageError>

Source§

async fn delete_schedule(&self, _name: &str) -> Result<bool, StorageError>

Source§

async fn is_healthy(&self) -> bool

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more