pub fn insert_serialized<C: SerializedCollection>(
        id: Option<u64>,
        contents: &C::Contents,
    ) -> Result<Self, Error> {
        let contents = C::serialize(contents)?;
        Ok(Self::insert(C::collection_name()?, id, contents))
    }
/// Inserts a new document with the serialized representation of `contents`
/// into `collection`.  If `id` is `None` a unique id will be generated. If
/// an id is provided and a document already exists with that id, a conflict
/// error will be returned.
Inserts a new document with the serialized representation of `contents`
into `collection`.  If `id` is `None` a unique id will be generated. If
an id is provided and a document already exists with that id, a conflict
error will be returned.
Inserts a new document with the serialized representation of ` contents ` into ` collection ` . If ` id ` is ` None ` a unique id will be generated . If an id is provided and a document already exists with that id a conflict error will be returned .
pub fn insert_serialized<C: SerializedCollection>(
        id: Option<u64>,
        contents: &C::Contents,
    ) -> Result<Self, Error> {
        let contents = C::serialize(contents)?;
        Ok(Self::insert(C::collection_name()?, id, contents))
    }
pub fn insert_serialized < C : SerializedCollection > ( id : Option < u64 > , contents : & C :: Contents , ) -> Result < Self , Error > { let contents = C :: serialize ( contents ) ? ; Ok ( Self :: insert ( C :: collection_name ( ) ? , id , contents ) ) }
Inserts a new document with the serialized representation of `contents`
into `collection`.
Inserts a new document with the serialized representation of ` contents ` into ` collection ` .
id
Option<u64>
contents
&C::Contents
id
Option<u64>
contents
&C::Contents