pub struct SessionStoreCheckpointSink { /* private fields */ }Expand description
Default adapter that forwards checkpoints to a
SessionStore. Construct via
SessionStoreCheckpointSink::new.
Implementations§
Source§impl SessionStoreCheckpointSink
impl SessionStoreCheckpointSink
pub fn new(store: Arc<dyn SessionStore>) -> Self
Trait Implementations§
Source§impl LoopCheckpointSink for SessionStoreCheckpointSink
impl LoopCheckpointSink for SessionStoreCheckpointSink
Source§fn save_checkpoint<'life0, 'life1, 'async_trait>(
&'life0 self,
checkpoint: &'life1 LoopCheckpoint,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_checkpoint<'life0, 'life1, 'async_trait>(
&'life0 self,
checkpoint: &'life1 LoopCheckpoint,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Persist a checkpoint. Called from inside the agent loop after a
successful tool round. Errors are logged at warn level and
otherwise swallowed — losing a checkpoint must not halt the
live run.
Source§fn load_latest<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<LoopCheckpoint>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_latest<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<LoopCheckpoint>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load the latest checkpoint for
run_id, if any. Returns None
when no checkpoint has been recorded.Auto Trait Implementations§
impl Freeze for SessionStoreCheckpointSink
impl !RefUnwindSafe for SessionStoreCheckpointSink
impl Send for SessionStoreCheckpointSink
impl Sync for SessionStoreCheckpointSink
impl Unpin for SessionStoreCheckpointSink
impl UnsafeUnpin for SessionStoreCheckpointSink
impl !UnwindSafe for SessionStoreCheckpointSink
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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