pub struct EngagementRepository { /* private fields */ }Implementations§
Source§impl EngagementRepository
impl EngagementRepository
pub fn new(db: &DbPool) -> Result<Self>
pub async fn create_engagement( &self, session_id: &str, user_id: &str, content_id: Option<&ContentId>, input: &CreateEngagementEventInput, ) -> Result<String>
pub async fn find_by_id(&self, id: &str) -> Result<Option<EngagementEvent>>
pub async fn list_by_session( &self, session_id: &str, ) -> Result<Vec<EngagementEvent>>
pub async fn list_by_user( &self, user_id: &str, limit: i64, ) -> Result<Vec<EngagementEvent>>
pub async fn get_session_engagement_summary( &self, session_id: &str, ) -> Result<Option<SessionEngagementSummary>>
Trait Implementations§
Source§impl Clone for EngagementRepository
impl Clone for EngagementRepository
Source§fn clone(&self) -> EngagementRepository
fn clone(&self) -> EngagementRepository
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 moreAuto Trait Implementations§
impl Freeze for EngagementRepository
impl !RefUnwindSafe for EngagementRepository
impl Send for EngagementRepository
impl Sync for EngagementRepository
impl Unpin for EngagementRepository
impl !UnwindSafe for EngagementRepository
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