pub struct Insight {
pub insight_type: InsightType,
pub severity: Severity,
pub title: String,
pub description: String,
pub value: f64,
pub threshold: f64,
pub timestamp: DateTime<Utc>,
pub endpoint: Option<String>,
pub recommendation: Option<String>,
}Expand description
An analytics insight
Fields§
§insight_type: InsightType§severity: Severity§title: String§description: String§value: f64§threshold: f64§timestamp: DateTime<Utc>§endpoint: Option<String>§recommendation: Option<String>Implementations§
Source§impl Insight
impl Insight
pub fn new( insight_type: InsightType, severity: Severity, title: impl Into<String>, description: impl Into<String>, ) -> Self
pub fn with_value(self, value: f64) -> Self
pub fn with_threshold(self, threshold: f64) -> Self
pub fn with_endpoint(self, endpoint: impl Into<String>) -> Self
pub fn with_recommendation(self, rec: impl Into<String>) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Insight
impl<'de> Deserialize<'de> for Insight
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
Auto Trait Implementations§
impl Freeze for Insight
impl RefUnwindSafe for Insight
impl Send for Insight
impl Sync for Insight
impl Unpin for Insight
impl UnwindSafe for Insight
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