pub struct EmailAnalysis {
pub category: String,
pub risk_score: u8,
pub risk_reason: String,
pub summary: String,
pub people: Value,
pub dates: Value,
pub amounts: Value,
pub action_items: Value,
pub clean_text: String,
pub requires_action: bool,
pub sender_intent: String,
pub action_deadline: Option<String>,
}Expand description
Full analysis result.
people / dates / amounts / action_items use serde_json::Value
because the LLM occasionally returns strings instead of structured
objects; tolerating either keeps the public API stable across prompt
revisions.
Fields§
§category: StringCategory label (free-form, but typically one of personal / work /
transactional / promotion / notification / spam / scam).
risk_score: u8Risk score 0-100; 100 = highest risk (phishing, fraud, malware link).
risk_reason: StringOne-line human-readable reason for the risk score.
summary: String1-3 sentence summary of the message content.
people: ValueExtracted people / entities (JSON shape free-form per LLM impl).
dates: ValueExtracted dates / time references mentioned in the body.
amounts: ValueExtracted amounts / numbers / monetary values.
action_items: ValueAction items the recipient might want to act on.
clean_text: StringCleaned plain-text body the LLM saw (matches mailrs-clean output).
requires_action: booltrue when the LLM judged the message as requiring user action.
sender_intent: StringOne-word sender intent (request / inform / confirm / notify / …).
action_deadline: Option<String>ISO-8601 date if an action deadline was detected.
Trait Implementations§
Source§impl Clone for EmailAnalysis
impl Clone for EmailAnalysis
Source§fn clone(&self) -> EmailAnalysis
fn clone(&self) -> EmailAnalysis
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more