blob: 4c48e50f4f5f102b945c506a0c4cd5f7f4da3227 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
use thiserror::Error;
use ::parser::ParseErrorReason;
#[derive(Debug, Clone, Error)]
pub enum VObjectErrorKind {
#[error("failed to parse: {}", source)]
Parse {
#[from]
source: ParseErrorReason,
},
#[error("Not a Vcard")]
NotAVCard,
#[error("Not a Icalendar: {}", _0)]
NotAnICalendar(String),
#[cfg(feature = "timeconversions")]
#[error("failed to parse time")]
ChronoError {
#[from]
source: chrono::format::ParseError,
},
}
pub(crate) type VObjectResult<T> = Result<T, VObjectErrorKind>;
|