pub struct LinkAnalyticsRepository { /* private fields */ }Implementations§
Source§impl LinkAnalyticsRepository
impl LinkAnalyticsRepository
pub fn new(db: &DbPool) -> Result<Self, ContentError>
pub async fn get_link_performance( &self, link_id: &LinkId, ) -> Result<Option<LinkPerformance>, Error>
pub async fn check_session_clicked_link( &self, link_id: &LinkId, session_id: &SessionId, ) -> Result<bool, Error>
pub async fn increment_link_clicks( &self, link_id: &LinkId, is_first_click: bool, ) -> Result<(), Error>
pub async fn get_clicks_by_link( &self, link_id: &LinkId, limit: i64, offset: i64, ) -> Result<Vec<LinkClick>, Error>
pub async fn get_content_journey_map( &self, limit: i64, offset: i64, ) -> Result<Vec<ContentJourneyNode>, Error>
pub async fn get_campaign_performance( &self, campaign_id: &CampaignId, ) -> Result<Option<CampaignPerformance>, Error>
pub async fn record_click( &self, params: &RecordClickParams, ) -> Result<(), Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LinkAnalyticsRepository
impl !RefUnwindSafe for LinkAnalyticsRepository
impl Send for LinkAnalyticsRepository
impl Sync for LinkAnalyticsRepository
impl Unpin for LinkAnalyticsRepository
impl !UnwindSafe for LinkAnalyticsRepository
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> 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