pub struct Unparsed { /* private fields */ }Expand description
Unparsed keeps the XML struct and will be serialized to XML with nothing change.
It is helpful when you are debugging on deserializeing certain element.
ⓘ
use xmlserde::Unparsed;
use xmlserde_derive::{XmlSerialize, XmlDeserialize};
#[derive(XmlSerialize, Deserialize)]
pub struct Person {
#[xmlserde(name=b"gender", ty = "attr")]
pub gender: Gender,
#[xmlserde(name=b"hobbies", ty = "child")]
pub hobbies: Unparsed
}In the example above, <hobbies> element keeps unchange after serializing and deserializing.
You can easily make a diff the former and latter version to check if other elments work well.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Unparsed
impl Send for Unparsed
impl Sync for Unparsed
impl Unpin for Unparsed
impl UnwindSafe for Unparsed
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