pub fn to_document(&self) -> Result<Document, Error> {
        Ok(Document {
            contents: C::serialize(&self.contents)?,
            header: self.header.clone(),
        })
    }
/// Converts this value to a serialized `Document`.
Converts this value to a serialized `Document`.
Converts this value to a serialized ` Document ` .
pub fn to_document(&self) -> Result<Document, Error> {
        Ok(Document {
            contents: C::serialize(&self.contents)?,
            header: self.header.clone(),
        })
    }
pub fn to_document ( & self ) -> Result < Document , Error > { Ok ( Document { contents : C :: serialize ( & self . contents ) ? , header : self . header . clone ( ) , } ) }
Converts this value to a serialized `Document`.
Converts this value to a serialized ` Document ` .
&self
&self