prost_validate/errors/
any.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use thiserror::Error;

#[derive(Debug, Clone, Error)]
pub enum Error {
    #[error("required")]
    Required,
    #[error("type_url must be in {0:?}")]
    In(Vec<String>),
    #[error("type_url must not be in {0:?}")]
    NotIn(Vec<String>),
}

impl From<Error> for super::Error {
    fn from(value: Error) -> Self {
        Self::Any(value)
    }
}