pub enum ModelError {
TypeNotFound {
type_name: String,
},
PropertyNotFound {
type_name: String,
property: String,
},
SchemaLoadError {
message: String,
},
ValidationError {
message: String,
},
ConstraintError {
constraint_key: String,
message: String,
},
ReferenceError {
reference: String,
message: String,
},
TypeIncompatibility {
expected: String,
actual: String,
},
InvalidConfiguration {
message: String,
},
IoError(Error),
JsonError(Error),
EvaluationError {
message: String,
},
Generic {
message: String,
},
}Expand description
Error types for FHIR model operations
Variants§
TypeNotFound
Type not found in model
PropertyNotFound
Property not found on type
Fields
SchemaLoadError
Schema loading error
ValidationError
Validation error
ConstraintError
Constraint evaluation error
Fields
ReferenceError
Reference resolution error
Fields
TypeIncompatibility
Type incompatibility error
InvalidConfiguration
Configuration error
IoError(Error)
Network or I/O error
JsonError(Error)
JSON parsing error
EvaluationError
FHIRPath evaluation error
Generic
Generic error with message
Implementations§
Source§impl ModelError
impl ModelError
Sourcepub fn type_not_found(type_name: impl Into<String>) -> Self
pub fn type_not_found(type_name: impl Into<String>) -> Self
Create a type not found error
Sourcepub fn property_not_found(
type_name: impl Into<String>,
property: impl Into<String>,
) -> Self
pub fn property_not_found( type_name: impl Into<String>, property: impl Into<String>, ) -> Self
Create a property not found error
Sourcepub fn schema_load_error(message: impl Into<String>) -> Self
pub fn schema_load_error(message: impl Into<String>) -> Self
Create a schema loading error
Sourcepub fn validation_error(message: impl Into<String>) -> Self
pub fn validation_error(message: impl Into<String>) -> Self
Create a validation error
Sourcepub fn constraint_error(
constraint_key: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn constraint_error( constraint_key: impl Into<String>, message: impl Into<String>, ) -> Self
Create a constraint error
Sourcepub fn reference_error(
reference: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn reference_error( reference: impl Into<String>, message: impl Into<String>, ) -> Self
Create a reference error
Sourcepub fn type_incompatibility(
expected: impl Into<String>,
actual: impl Into<String>,
) -> Self
pub fn type_incompatibility( expected: impl Into<String>, actual: impl Into<String>, ) -> Self
Create a type incompatibility error
Sourcepub fn invalid_configuration(message: impl Into<String>) -> Self
pub fn invalid_configuration(message: impl Into<String>) -> Self
Create an invalid configuration error
Sourcepub fn evaluation_error(message: impl Into<String>) -> Self
pub fn evaluation_error(message: impl Into<String>) -> Self
Create an evaluation error
Trait Implementations§
Source§impl Debug for ModelError
impl Debug for ModelError
Source§impl Display for ModelError
impl Display for ModelError
Source§impl Error for ModelError
impl Error for ModelError
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<Error> for ModelError
impl From<Error> for ModelError
Auto Trait Implementations§
impl Freeze for ModelError
impl !RefUnwindSafe for ModelError
impl Send for ModelError
impl Sync for ModelError
impl Unpin for ModelError
impl !UnwindSafe for ModelError
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