pub trait ConfigChangesStore:
Send
+ Sync
+ 'static {
// Required methods
fn record<'life0, 'life1, 'async_trait>(
&'life0 self,
row: &'life1 ConfigChangeRow,
) -> Pin<Box<dyn Future<Output = Result<(), ConfigChangesError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn tail<'life0, 'async_trait>(
&'life0 self,
n: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<ConfigChangeRow>, ConfigChangesError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
patch_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ConfigChangeRow>, ConfigChangesError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Required Methods§
Sourcefn record<'life0, 'life1, 'async_trait>(
&'life0 self,
row: &'life1 ConfigChangeRow,
) -> Pin<Box<dyn Future<Output = Result<(), ConfigChangesError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn record<'life0, 'life1, 'async_trait>(
&'life0 self,
row: &'life1 ConfigChangeRow,
) -> Pin<Box<dyn Future<Output = Result<(), ConfigChangesError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Idempotent on (patch_id, status) — repeat insert with
the same key is a no-op. Caller passes one row per
state transition.
Sourcefn tail<'life0, 'async_trait>(
&'life0 self,
n: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<ConfigChangeRow>, ConfigChangesError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn tail<'life0, 'async_trait>(
&'life0 self,
n: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<ConfigChangeRow>, ConfigChangesError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Latest n rows ordered by created_at DESC. Capped at
200 internally so a runaway tool call cannot pull the full
table into memory.
Sourcefn get<'life0, 'life1, 'async_trait>(
&'life0 self,
patch_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ConfigChangeRow>, ConfigChangesError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
patch_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ConfigChangeRow>, ConfigChangesError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Latest row for a given patch_id, regardless of status.
Returns None when no row exists yet (proposal never
recorded — only happens during a race window between
staging file write and the first record).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".