imessage_database/error/query_context.rs
1/*!
2 Errors that can happen when parsing query context data.
3*/
4
5use std::fmt::{Display, Formatter, Result};
6
7/// Errors that can happen when parsing query context data
8#[derive(Debug)]
9pub enum QueryContextError {
10 InvalidDate(String),
11}
12
13impl Display for QueryContextError {
14 fn fmt(&self, fmt: &mut Formatter<'_>) -> Result {
15 match self {
16 QueryContextError::InvalidDate(date) => write!(
17 fmt,
18 "Invalid date provided: {date}! Must be in format YYYY-MM-DD."
19 ),
20 }
21 }
22}