pub struct InMemoryReadLedger { /* private fields */ }Expand description
Read records in process memory, per scope, with least-recently-used eviction of scopes (spec 3.1 §10 D2, D7).
§Example
use std::sync::Arc;
use adk_devtools::{InMemoryReadLedger, Workspace};
let ws = Workspace::new("./my-repo").with_read_ledger(Arc::new(InMemoryReadLedger::new()));Implementations§
Trait Implementations§
Source§impl Default for InMemoryReadLedger
impl Default for InMemoryReadLedger
Source§impl ReadLedger for InMemoryReadLedger
impl ReadLedger for InMemoryReadLedger
Source§fn record<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
scope: &'life1 ReadScope,
path: &'life2 str,
sha256: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn record<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
scope: &'life1 ReadScope,
path: &'life2 str,
sha256: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Records that
scope read or wrote path and saw content with digest sha256,
replacing an earlier record. Read moreSource§fn digest<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: &'life1 ReadScope,
path: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn digest<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: &'life1 ReadScope,
path: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Auto Trait Implementations§
impl !Freeze for InMemoryReadLedger
impl Forget for InMemoryReadLedger
impl Move for InMemoryReadLedger
impl RefUnwindSafe for InMemoryReadLedgerwhere
Mutex<Scopes>: RefUnwindSafe,
impl Send for InMemoryReadLedger
impl Sync for InMemoryReadLedger
impl Unpin for InMemoryReadLedger
impl UnsafeUnpin for InMemoryReadLedgerwhere
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<(ReadScope, (u64, HashMap<String, String>))>: UnsafeUnpin,
impl UnwindSafe for InMemoryReadLedgerwhere
Mutex<Scopes>: UnwindSafe,
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