pub struct ArticleStats {
pub total_purchases: u64,
pub total_revenue_cents: u64,
pub unique_readers: u64,
pub avg_read_duration_seconds: u64,
pub avg_scroll_depth: u8,
pub conversion_rate: f32,
}Expand description
Article statistics
Fields§
§total_purchases: u64Total number of purchases
total_revenue_cents: u64Total revenue in cents
unique_readers: u64Total number of unique readers
avg_read_duration_seconds: u64Average read duration in seconds
avg_scroll_depth: u8Average scroll depth percentage
conversion_rate: f32Conversion rate (purchases / views * 100)
Implementations§
Source§impl ArticleStats
impl ArticleStats
Trait Implementations§
Source§impl Clone for ArticleStats
impl Clone for ArticleStats
Source§fn clone(&self) -> ArticleStats
fn clone(&self) -> ArticleStats
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 ArticleStats
impl Debug for ArticleStats
Source§impl Default for ArticleStats
impl Default for ArticleStats
Source§fn default() -> ArticleStats
fn default() -> ArticleStats
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ArticleStats
impl<'de> Deserialize<'de> for ArticleStats
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&ArticleStats> for ArticleStatsDto
impl From<&ArticleStats> for ArticleStatsDto
Source§fn from(stats: &ArticleStats) -> Self
fn from(stats: &ArticleStats) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ArticleStats
impl RefUnwindSafe for ArticleStats
impl Send for ArticleStats
impl Sync for ArticleStats
impl Unpin for ArticleStats
impl UnsafeUnpin for ArticleStats
impl UnwindSafe for ArticleStats
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