pub struct Options {
pub version: Option<Version>,
pub dictionary: Option<Arc<Dictionary>>,
pub strict: bool,
}Expand description
How to read a message: which release, which dictionary, and whether validation failures are fatal.
let options = hl7_2::Options::new()
.with_version(hl7_2::Version::V2_3_1) // ignore what MSH-12 says
.strict(); // reject what does not conformFields§
§version: Option<Version>Read every message as this release, whatever MSH-12 declares. Use it for a sender known to mislabel its version.
dictionary: Option<Arc<Dictionary>>Read through this dictionary instead of the bundled one for the release — schema mode.
strict: boolFail the parse when validation reports a Severity::Error, rather
than returning a message the caller must remember to check.
Implementations§
Source§impl Options
impl Options
Sourcepub fn with_version(self, version: Version) -> Options
pub fn with_version(self, version: Version) -> Options
Read as version whatever MSH-12 says.
Sourcepub fn with_dictionary(self, dictionary: Arc<Dictionary>) -> Options
pub fn with_dictionary(self, dictionary: Arc<Dictionary>) -> Options
Read through dictionary — schema mode.
Sourcepub fn strict(self) -> Options
pub fn strict(self) -> Options
Reject a message that does not conform; see Options::strict.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnsafeUnpin for Options
impl UnwindSafe for Options
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