pub struct UserNative {
pub users: Vec<User>,
}Expand description
Contains the information from the Prelude native user XML.
Fields§
§users: Vec<User>Implementations§
Source§impl UserNative
impl UserNative
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_user_native_file;
let file_path = Path::new("tests/assets/user_native_small.xml");
let native = parse_user_native_file(&file_path).unwrap();
let json = native.to_json().unwrap();
// Verify it's valid JSON and contains the expected user data
assert!(json.contains("uniqueId\":\"1691421275437\""));
assert!(json.contains("\"value\":\"jazz@artemis.com\""));Trait Implementations§
Source§impl Clone for UserNative
impl Clone for UserNative
Source§fn clone(&self) -> UserNative
fn clone(&self) -> UserNative
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 UserNative
impl Debug for UserNative
Source§impl<'de> Deserialize<'de> for UserNative
impl<'de> Deserialize<'de> for UserNative
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 UserNative
impl PartialEq for UserNative
Source§impl Serialize for UserNative
impl Serialize for UserNative
impl StructuralPartialEq for UserNative
Auto Trait Implementations§
impl Freeze for UserNative
impl RefUnwindSafe for UserNative
impl Send for UserNative
impl Sync for UserNative
impl Unpin for UserNative
impl UnwindSafe for UserNative
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