pub struct WdfDocument {
pub schema: String,
pub version: u32,
pub root: WdfRoot,
}Expand description
The canonical WDF document.
This is the model every adapter converts into and out of. It serializes to
(and deserializes from) WDF JSON, so serde_json::to_value(&doc) produces
canonical WDF JSON ready to store or send over the wire.
Documents received from the outside world should go through
crate::validate_and_canonicalize rather than plain deserialization:
deserialization alone accepts structurally valid but semantically invalid
documents (unknown marks, empty lists, heading level 0, …) and skips
canonicalization.
Fields§
§schema: StringAlways WDF_SCHEMA after canonicalization.
version: u32Always WDF_VERSION after canonicalization.
root: WdfRootThe document root; node_type is "doc".
Implementations§
Source§impl WdfDocument
impl WdfDocument
Trait Implementations§
Source§impl Clone for WdfDocument
impl Clone for WdfDocument
Source§impl Debug for WdfDocument
impl Debug for WdfDocument
Source§impl<'de> Deserialize<'de> for WdfDocument
impl<'de> Deserialize<'de> for WdfDocument
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 WdfDocument
impl PartialEq for WdfDocument
Source§impl Serialize for WdfDocument
impl Serialize for WdfDocument
impl StructuralPartialEq for WdfDocument
Auto Trait Implementations§
impl Freeze for WdfDocument
impl RefUnwindSafe for WdfDocument
impl Send for WdfDocument
impl Sync for WdfDocument
impl Unpin for WdfDocument
impl UnsafeUnpin for WdfDocument
impl UnwindSafe for WdfDocument
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