pub struct SessionRecorder { /* private fields */ }Implementations§
Source§impl SessionRecorder
impl SessionRecorder
pub fn new(db: Connection) -> Self
pub fn record_action( &self, session_id: &str, agent_pid: u32, action_type: &str, payload: Value, ) -> Result<u32, RecorderError>
pub fn get_log( &self, session_id: &str, ) -> Result<Vec<SessionAction>, RecorderError>
pub fn get_state_at_step( &self, session_id: &str, step: u32, ) -> Result<SessionState, RecorderError>
pub fn cleanup_old_sessions( &self, retention_days: u32, ) -> Result<u64, RecorderError>
Auto Trait Implementations§
impl !Freeze for SessionRecorder
impl !RefUnwindSafe for SessionRecorder
impl Send for SessionRecorder
impl !Sync for SessionRecorder
impl Unpin for SessionRecorder
impl UnsafeUnpin for SessionRecorder
impl !UnwindSafe for SessionRecorder
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> 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