pub struct LinkAnalyticsService { /* private fields */ }Implementations§
Source§impl LinkAnalyticsService
impl LinkAnalyticsService
pub fn new(db: &DbPool) -> Result<Self, ContentError>
pub async fn track_click( &self, params: &TrackClickParams, ) -> Result<LinkClick, ContentError>
pub async fn get_link_performance( &self, link_id: &LinkId, ) -> Result<Option<LinkPerformance>, ContentError>
pub async fn get_campaign_performance( &self, campaign_id: &CampaignId, ) -> Result<Option<CampaignPerformance>, ContentError>
pub async fn get_content_journey_map( &self, limit: Option<i64>, offset: Option<i64>, ) -> Result<Vec<ContentJourneyNode>, ContentError>
pub async fn get_link_clicks( &self, link_id: &LinkId, limit: Option<i64>, offset: Option<i64>, ) -> Result<Vec<LinkClick>, ContentError>
pub async fn get_links_by_campaign( &self, campaign_id: &CampaignId, ) -> Result<Vec<CampaignLink>, ContentError>
pub async fn get_links_by_source_content( &self, source_content_id: &ContentId, ) -> Result<Vec<CampaignLink>, ContentError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LinkAnalyticsService
impl !RefUnwindSafe for LinkAnalyticsService
impl Send for LinkAnalyticsService
impl Sync for LinkAnalyticsService
impl Unpin for LinkAnalyticsService
impl !UnwindSafe for LinkAnalyticsService
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