#[non_exhaustive]pub enum DataErrorKind {
MarkerNotFound,
IdentifierNotFound,
InvalidRequest,
InconsistentData(DataMarkerInfo),
Downcast(&'static str),
Deserialize,
Custom,
}
Expand description
A list specifying general categories of data provider error.
Errors may be caused either by a malformed request or by the data provider not being able to fulfill a well-formed request.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MarkerNotFound
No data for the requested data marker. This is only returned by DynamicDataProvider
.
IdentifierNotFound
There is data for the data marker, but not for this particular data identifier.
InvalidRequest
The request is invalid, such as a request for a singleton marker containing a data identifier.
InconsistentData(DataMarkerInfo)
The data for two DataMarker
s is not consistent.
Downcast(&'static str)
An error occured during Any
downcasting.
Deserialize
An error occured during [serde
] deserialization.
Check debug logs for potentially more information.
Custom
An unspecified error occurred.
Check debug logs for potentially more information.
Implementations§
Source§impl DataErrorKind
impl DataErrorKind
Sourcepub const fn into_error(self) -> DataError
pub const fn into_error(self) -> DataError
Converts this DataErrorKind into a DataError.
If possible, you should attach context using a with_
function.
Sourcepub const fn with_marker(self, marker: DataMarkerInfo) -> DataError
pub const fn with_marker(self, marker: DataMarkerInfo) -> DataError
Creates a DataError with a data marker context.
Sourcepub const fn with_str_context(self, context: &'static str) -> DataError
pub const fn with_str_context(self, context: &'static str) -> DataError
Creates a DataError with a string context.
Sourcepub fn with_type_context<T>(self) -> DataError
pub fn with_type_context<T>(self) -> DataError
Creates a DataError with a type name context.
Sourcepub fn with_req(self, marker: DataMarkerInfo, req: DataRequest<'_>) -> DataError
pub fn with_req(self, marker: DataMarkerInfo, req: DataRequest<'_>) -> DataError
Creates a DataError with a request context.
Trait Implementations§
Source§impl Clone for DataErrorKind
impl Clone for DataErrorKind
Source§fn clone(&self) -> DataErrorKind
fn clone(&self) -> DataErrorKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more