1#[derive(Debug, thiserror::Error)]
3#[error(transparent)]
4pub struct Error(#[from] ErrorKind);
5
6#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, thiserror::Error)]
7pub(crate) enum ErrorKind {
8 #[error("collection path conversion {0}")]
9 CollectionPathConversion(String),
10 #[error("contains invalid charactor")]
11 ContainsInvalidCharacter,
12 #[error("contains slash")]
13 ContainsSlash,
14 #[error("document id conversion {0}")]
15 DocumentIdConversion(String),
16 #[error("document path conversion {0}")]
17 DocumentPathConversion(String),
18 #[error("ends with hyphen")]
19 EndsWithHyphen,
20 #[error("invalid name")]
21 InvalidName,
22 #[error("invalid number of path components")]
23 InvalidNumberOfPathComponents,
24 #[error("byte length exceeded")]
25 LengthOutOfBounds,
26 #[error("matches the regular expression `__.*__`")]
27 MatchesReservedIdPattern,
28 #[error("not contains slash")]
29 NotContainsSlash,
30 #[error("project id conversion {0}")]
31 ProjectIdConversion(String),
32 #[error("single period or double periods")]
33 SinglePeriodOrDoublePeriods,
34 #[error("starts with non letter")]
35 StartsWithNonLetter,
36}