pub trait CaptureUnit: Send + Sync {
// Required methods
fn pending<'life0, 'async_trait>(
&'life0 self,
limit: usize,
) -> Pin<Box<dyn Future<Output = Vec<TranscriptRef>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn import<'life0, 'life1, 'async_trait>(
&'life0 self,
transcript: &'life1 TranscriptRef,
) -> Pin<Box<dyn Future<Output = Result<u32, RecallError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn mark_swept<'life0, 'life1, 'async_trait>(
&'life0 self,
transcript: &'life1 TranscriptRef,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
One CLI-transcript import, as the scheduler sees it.
Behind a trait so the scheduling — when it sweeps, when it yields, when it gives up on a file — is exercised without a store, a daemon or a CLI.
Required Methods§
Sourcefn pending<'life0, 'async_trait>(
&'life0 self,
limit: usize,
) -> Pin<Box<dyn Future<Output = Vec<TranscriptRef>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pending<'life0, 'async_trait>(
&'life0 self,
limit: usize,
) -> Pin<Box<dyn Future<Output = Vec<TranscriptRef>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Finished, unarchived transcripts across the configured CLIs, oldest
first, at most limit of them.
Sourcefn import<'life0, 'life1, 'async_trait>(
&'life0 self,
transcript: &'life1 TranscriptRef,
) -> Pin<Box<dyn Future<Output = Result<u32, RecallError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn import<'life0, 'life1, 'async_trait>(
&'life0 self,
transcript: &'life1 TranscriptRef,
) -> Pin<Box<dyn Future<Output = Result<u32, RecallError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Archive one transcript and ingest the archive. Ok(0) means the
transcript held no user turn, so there was nothing to archive.
Sourcefn mark_swept<'life0, 'life1, 'async_trait>(
&'life0 self,
transcript: &'life1 TranscriptRef,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn mark_swept<'life0, 'life1, 'async_trait>(
&'life0 self,
transcript: &'life1 TranscriptRef,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Record that the sweep is past this transcript. Called after a successful import, and after a transcript is given up on.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".