#[non_exhaustive]pub enum Error {
Show 13 variants
Parse(Error),
Schema(SchemaError),
Version(VersionError),
Mapping(MappingError),
Object(ObjectError),
Name(InterfaceNameError),
MissingTtl,
InvalidEndpoint(EndpointError),
DuplicateMapping {
endpoint: String,
duplicate: String,
},
NameMismatch {
name: String,
prev_name: String,
},
VersionChange(VersionChangeError),
InterfaceConversion {
exp_type: InterfaceType,
exp_aggregation: Aggregation,
got_type: InterfaceType,
got_aggregation: Aggregation,
},
PropertyObject,
}Expand description
Error for parsing and validating an interface.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Parse(Error)
Couldn’t parse the interface JSON.
Schema(SchemaError)
Invalid InterfaceJson
Version(VersionError)
Invalid InterfaceVersion
Mapping(MappingError)
Couldn’t parse interface for an invalid mapping
Object(ObjectError)
Couldn’t parse object datastream interface
Name(InterfaceNameError)
Couldn’t parse interface name.
MissingTtl
The database retention policy is set to use_ttl but the TTL was not specified.
InvalidEndpoint(EndpointError)
Error while parsing the endpoint.
DuplicateMapping
The interfaced endpoints must all be unique.
NameMismatch
The name of the interface was changed.
VersionChange(VersionChangeError)
Invalid version change.
InterfaceConversion
Invalid interface type
Fields
§
exp_type: InterfaceTypeThe interface type we expected.
§
exp_aggregation: AggregationThe aggregation we expected.
§
got_type: InterfaceTypeThe actual interface type.
§
got_aggregation: AggregationThe actual aggregation.
PropertyObject
Unsupported interface type.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<EndpointError> for Error
impl From<EndpointError> for Error
Source§fn from(source: EndpointError) -> Self
fn from(source: EndpointError) -> Self
Converts to this type from the input type.
Source§impl From<InterfaceNameError> for Error
impl From<InterfaceNameError> for Error
Source§fn from(source: InterfaceNameError) -> Self
fn from(source: InterfaceNameError) -> Self
Converts to this type from the input type.
Source§impl From<MappingError> for Error
impl From<MappingError> for Error
Source§fn from(source: MappingError) -> Self
fn from(source: MappingError) -> Self
Converts to this type from the input type.
Source§impl From<ObjectError> for Error
impl From<ObjectError> for Error
Source§fn from(source: ObjectError) -> Self
fn from(source: ObjectError) -> Self
Converts to this type from the input type.
Source§impl From<SchemaError> for Error
impl From<SchemaError> for Error
Source§fn from(source: SchemaError) -> Self
fn from(source: SchemaError) -> Self
Converts to this type from the input type.
Source§impl From<VersionChangeError> for Error
impl From<VersionChangeError> for Error
Source§fn from(source: VersionChangeError) -> Self
fn from(source: VersionChangeError) -> Self
Converts to this type from the input type.
Source§impl From<VersionError> for Error
impl From<VersionError> for Error
Source§fn from(source: VersionError) -> Self
fn from(source: VersionError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more