1pub mod access;
2pub mod basin;
3pub mod config;
4pub mod metrics;
5pub mod resources;
6pub mod stream;
7mod strings;
8
9#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
10#[error("{0}")]
11pub struct ValidationError(pub String);
12
13impl From<String> for ValidationError {
14 fn from(value: String) -> Self {
15 ValidationError(value)
16 }
17}
18
19impl From<&str> for ValidationError {
20 fn from(value: &str) -> Self {
21 ValidationError(value.to_owned())
22 }
23}
24
25impl From<crate::record::FencingTokenTooLongError> for ValidationError {
26 fn from(e: crate::record::FencingTokenTooLongError) -> Self {
27 ValidationError(e.to_string())
28 }
29}
30
31impl From<resources::StartAfterLessThanPrefixError> for ValidationError {
32 fn from(e: resources::StartAfterLessThanPrefixError) -> Self {
33 ValidationError(e.to_string())
34 }
35}