pub struct AsgLedgerStore<'a> {
pub repo: &'a Repository,
pub fts: Option<&'a SearchFtsDb>,
}Fields§
§repo: &'a Repository§fts: Option<&'a SearchFtsDb>Borrowed FTS connection from the owning Engine. When Some,
enables the SQLite write-through cache: list_entries reads from
SQLite when populated, append_entry writes to SQLite after the git
commit. No Connection::open on every method call.
Implementations§
Source§impl<'a> AsgLedgerStore<'a>
impl<'a> AsgLedgerStore<'a>
Sourcepub fn new(repo: &'a Repository) -> Self
pub fn new(repo: &'a Repository) -> Self
Construct without SQLite caching (tests, internal engine calls).
Sourcepub fn from_engine(engine: &'a Engine) -> Self
pub fn from_engine(engine: &'a Engine) -> Self
Convenience: borrow the FTS connection already open in engine.
Trait Implementations§
Source§impl<'a> LedgerStore for AsgLedgerStore<'a>
impl<'a> LedgerStore for AsgLedgerStore<'a>
fn append_entry( &self, ref_name: &str, entry: &LedgerEntry, agent_id: &str, ) -> Result<()>
Source§fn list_entries_with_superseded(
&self,
ref_name: &str,
symbol_id: &str,
) -> Result<Vec<LedgerEntry>>
fn list_entries_with_superseded( &self, ref_name: &str, symbol_id: &str, ) -> Result<Vec<LedgerEntry>>
Full list including superseded entries.
Source§fn list_entries(
&self,
ref_name: &str,
symbol_id: &str,
) -> Result<Vec<LedgerEntry>>
fn list_entries( &self, ref_name: &str, symbol_id: &str, ) -> Result<Vec<LedgerEntry>>
List entries for a symbol, newest first. By default, entries that
have been superseded by a later entry are filtered out.
Source§fn approve_entry(
&self,
_ref_name: &str,
_entry_id: &str,
_approver_id: &str,
_approver_kind: &str,
_message: Option<&str>,
_agent_id: &str,
) -> Result<ApprovalOutcome>
fn approve_entry( &self, _ref_name: &str, _entry_id: &str, _approver_id: &str, _approver_kind: &str, _message: Option<&str>, _agent_id: &str, ) -> Result<ApprovalOutcome>
Approve an awaiting-approval entry. The OSS default returns a
“commercial feature” error — the real implementation lives in
the
agentstatedeveloper-ratify crate (Team-tier).Source§fn reject_entry(
&self,
_ref_name: &str,
_entry_id: &str,
_reviewer_id: &str,
_reviewer_kind: &str,
_reason: &str,
_agent_id: &str,
) -> Result<ReviewOutcome>
fn reject_entry( &self, _ref_name: &str, _entry_id: &str, _reviewer_id: &str, _reviewer_kind: &str, _reason: &str, _agent_id: &str, ) -> Result<ReviewOutcome>
Reject an awaiting-approval entry. See
approve_entry — OSS
default errors; real impl in agentstatedeveloper-ratify.Source§fn withdraw_entry(
&self,
_ref_name: &str,
_entry_id: &str,
_author_id: &str,
_agent_id: &str,
) -> Result<ReviewOutcome>
fn withdraw_entry( &self, _ref_name: &str, _entry_id: &str, _author_id: &str, _agent_id: &str, ) -> Result<ReviewOutcome>
Withdraw an awaiting-approval entry. See
approve_entry — OSS
default errors; real impl in agentstatedeveloper-ratify.Auto Trait Implementations§
impl<'a> !RefUnwindSafe for AsgLedgerStore<'a>
impl<'a> !Send for AsgLedgerStore<'a>
impl<'a> !Sync for AsgLedgerStore<'a>
impl<'a> !UnwindSafe for AsgLedgerStore<'a>
impl<'a> Freeze for AsgLedgerStore<'a>
impl<'a> Unpin for AsgLedgerStore<'a>
impl<'a> UnsafeUnpin for AsgLedgerStore<'a>
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