pub fn as_regex(&self) -> Option<RawRegexRef<'_>> {
        match self {
            RawBson::RegularExpression(v) => Some(RawRegexRef {
                pattern: v.pattern.as_str(),
                options: v.options.as_str(),
            }),
            _ => None,
        }
    }
/// Gets a reference to the [`Regex`] that's wrapped or returns `None` if the wrapped value
/// isn't a BSON regular expression.
Gets a reference to the [`Regex`] that's wrapped or returns `None` if the wrapped value
isn't a BSON regular expression.
Gets a reference to the [ ` Regex ` ] that ' s wrapped or returns ` None ` if the wrapped value isn ' t a BSON regular expression .
pub fn as_regex(&self) -> Option<RawRegexRef<'_>> {
        match self {
            RawBson::RegularExpression(v) => Some(RawRegexRef {
                pattern: v.pattern.as_str(),
                options: v.options.as_str(),
            }),
            _ => None,
        }
    }
pub fn as_regex ( & self ) -> Option < RawRegexRef < ' _ > > { match self { RawBson :: RegularExpression ( v ) => Some ( RawRegexRef { pattern : v . pattern . as_str ( ) , options : v . options . as_str ( ) , } ) , _ => None , } }
Gets a reference to the [`Regex`] that's wrapped or returns `None` if the wrapped value
isn't a BSON regular expression.
Gets a reference to the [ ` Regex ` ] that ' s wrapped or returns ` None ` if the wrapped value isn ' t a BSON regular expression .
&self
&self