#[derive(Debug, Clone, Copy, PartialEq, Eq, thiserror::Error)]
#[error("unsupported version: api_key={api_key}, version={version}")]
#[non_exhaustive]
pub struct UnsupportedVersion {
pub api_key: i16,
pub version: i16,
}
impl UnsupportedVersion {
#[must_use]
pub const fn new(api_key: i16, version: i16) -> Self {
Self { api_key, version }
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, thiserror::Error)]
#[error("unsupported field version: api_key={api_key}, field={field}, version={version}")]
#[non_exhaustive]
pub struct UnsupportedFieldVersion {
pub api_key: i16,
pub field: &'static str,
pub version: i16,
}
impl UnsupportedFieldVersion {
#[must_use]
pub const fn new(api_key: i16, field: &'static str, version: i16) -> Self {
Self {
api_key,
field,
version,
}
}
}