pub struct ContextRepository { /* private fields */ }Implementations§
Source§impl ContextRepository
impl ContextRepository
pub async fn create_context( &self, user_id: &UserId, session_id: Option<&SessionId>, name: &str, ) -> Result<ContextId, RepositoryError>
pub async fn validate_context_ownership( &self, context_id: &ContextId, user_id: &UserId, ) -> Result<(), RepositoryError>
pub async fn update_context_name( &self, context_id: &ContextId, user_id: &UserId, name: &str, ) -> Result<(), RepositoryError>
pub async fn delete_context( &self, context_id: &ContextId, user_id: &UserId, ) -> Result<(), RepositoryError>
Source§impl ContextRepository
impl ContextRepository
pub async fn get_context( &self, context_id: &ContextId, user_id: &UserId, ) -> Result<UserContext, RepositoryError>
pub async fn list_contexts_basic( &self, user_id: &UserId, ) -> Result<Vec<UserContext>, RepositoryError>
pub async fn list_contexts_with_stats( &self, user_id: &UserId, ) -> Result<Vec<UserContextWithStats>, RepositoryError>
pub async fn find_by_session_id( &self, session_id: &SessionId, ) -> Result<Option<UserContext>, RepositoryError>
pub async fn get_context_events_since( &self, context_id: &ContextId, last_seen: DateTime<Utc>, ) -> Result<Vec<ContextStateEvent>, RepositoryError>
Trait Implementations§
Source§impl Clone for ContextRepository
impl Clone for ContextRepository
Source§fn clone(&self) -> ContextRepository
fn clone(&self) -> ContextRepository
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContextRepository
impl Debug for ContextRepository
Source§impl Repository for ContextRepository
impl Repository for ContextRepository
Auto Trait Implementations§
impl Freeze for ContextRepository
impl !RefUnwindSafe for ContextRepository
impl Send for ContextRepository
impl Sync for ContextRepository
impl Unpin for ContextRepository
impl !UnwindSafe for ContextRepository
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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