pub struct Hl7Error {
pub message: String,
pub code: Option<String>,
}Expand description
Error type for HL7 message processing (parsing, validation, serialization).
Mirrors the .NET HL7Exception: it carries a human readable message plus an
optional code taken from the set of well known categories below.
Fields§
§message: StringHuman readable description of what went wrong.
code: Option<String>Optional category for the error (one of the associated constants).
Implementations§
Source§impl Hl7Error
impl Hl7Error
Sourcepub const REQUIRED_FIELD_MISSING: &'static str = "Validation Error - Required field missing in message"
pub const REQUIRED_FIELD_MISSING: &'static str = "Validation Error - Required field missing in message"
Validation error due to a required field missing in the message.
Sourcepub const UNSUPPORTED_MESSAGE_TYPE: &'static str = "Validation Error - Message Type not supported by this implementation"
pub const UNSUPPORTED_MESSAGE_TYPE: &'static str = "Validation Error - Message Type not supported by this implementation"
Validation error where the message type is not supported by this implementation.
Sourcepub const BAD_MESSAGE: &'static str = "Validation Error - Bad Message"
pub const BAD_MESSAGE: &'static str = "Validation Error - Bad Message"
Validation error due to a malformed or invalid message.
Sourcepub const PARSING_ERROR: &'static str = "Parsing Error"
pub const PARSING_ERROR: &'static str = "Parsing Error"
Error that occurred during parsing of the HL7 message.
Sourcepub const SERIALIZATION_ERROR: &'static str = "Serialization Error"
pub const SERIALIZATION_ERROR: &'static str = "Serialization Error"
Error that occurred during serialization of the HL7 message.
Trait Implementations§
impl Eq for Hl7Error
Source§impl Error for Hl7Error
impl Error for Hl7Error
1.30.0 · 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()
impl StructuralPartialEq for Hl7Error
Auto Trait Implementations§
impl Freeze for Hl7Error
impl RefUnwindSafe for Hl7Error
impl Send for Hl7Error
impl Sync for Hl7Error
impl Unpin for Hl7Error
impl UnsafeUnpin for Hl7Error
impl UnwindSafe for Hl7Error
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