pub struct SubjectNative {
pub patients: Vec<Patient>,
}Expand description
Contains the information from the Prelude native subject XML.
Fields§
§patients: Vec<Patient>Implementations§
Source§impl SubjectNative
impl SubjectNative
Sourcepub fn to_json(&self) -> Result<String>
pub fn to_json(&self) -> Result<String>
Convert to a JSON string
§Example
use std::path::Path;
use prelude_xml_parser::parse_subject_native_file;
let file_path = Path::new("tests/assets/subject_native_small.xml");
let native = parse_subject_native_file(&file_path).unwrap();
let json = native.to_json().unwrap();
// Verify the JSON contains expected patient data
assert!(json.contains("ABC-001"));
assert!(json.contains("Paul Sanders"));
assert!(json.contains("Labrador"));Trait Implementations§
Source§impl Clone for SubjectNative
impl Clone for SubjectNative
Source§fn clone(&self) -> SubjectNative
fn clone(&self) -> SubjectNative
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SubjectNative
impl Debug for SubjectNative
Source§impl<'de> Deserialize<'de> for SubjectNative
impl<'de> Deserialize<'de> for SubjectNative
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SubjectNative
impl PartialEq for SubjectNative
Source§impl Serialize for SubjectNative
impl Serialize for SubjectNative
impl StructuralPartialEq for SubjectNative
Auto Trait Implementations§
impl Freeze for SubjectNative
impl RefUnwindSafe for SubjectNative
impl Send for SubjectNative
impl Sync for SubjectNative
impl Unpin for SubjectNative
impl UnwindSafe for SubjectNative
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