pub fn as_document(&self) -> Option<&'_ RawDocument> {
        match self {
            RawBson::Document(v) => Some(v),
            _ => None,
        }
    }
/// Gets a reference to the [`RawDocumentBuf`] that's wrapped or returns `None` if the wrapped
/// value isn't a BSON document.
Gets a reference to the [`RawDocumentBuf`] that's wrapped or returns `None` if the wrapped
value isn't a BSON document.
Gets a reference to the [ ` RawDocumentBuf ` ] that ' s wrapped or returns ` None ` if the wrapped value isn ' t a BSON document .
pub fn as_document(&self) -> Option<&'_ RawDocument> {
        match self {
            RawBson::Document(v) => Some(v),
            _ => None,
        }
    }
pub fn as_document ( & self ) -> Option < & ' _ RawDocument > { match self { RawBson :: Document ( v ) => Some ( v ) , _ => None , } }
Gets a reference to the [`RawDocumentBuf`] that's wrapped or returns `None` if the wrapped
value isn't a BSON document.
Gets a reference to the [ ` RawDocumentBuf ` ] that ' s wrapped or returns ` None ` if the wrapped value isn ' t a BSON document .
&self
&self