fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, Self::Error>
    where
        V: Visitor<'de>,
    {
        // for now, we never visit options ( and therefore ignore part of the type )
        self.calls.push(Tokens::Option);
        if self.magic == 0 {
            visitor.visit_none()
        } else {
            visitor.visit_some(MockDeserializer {
                calls: self.calls,
                magic: self.magic.saturating_sub(1),
            })
        }
    }
/// Hint that the `Deserialize` type is expecting an optional value.
///
/// This allows deserializers that encode an optional value as a nullable
/// value to convert the null value into `None` and a regular value into
/// `Some(value)`.
Hint that the `Deserialize` type is expecting an optional value.
This allows deserializers that encode an optional value as a nullable
value to convert the null value into `None` and a regular value into
`Some(value)`.
Hint that the ` Deserialize ` type is expecting an optional value . This allows deserializers that encode an optional value as a nullable value to convert the null value into ` None ` and a regular value into ` Some ( value ) ` .
fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, Self::Error>
    where
        V: Visitor<'de>,
    {
        // for now, we never visit options ( and therefore ignore part of the type )
        self.calls.push(Tokens::Option);
        if self.magic == 0 {
            visitor.visit_none()
        } else {
            visitor.visit_some(MockDeserializer {
                calls: self.calls,
                magic: self.magic.saturating_sub(1),
            })
        }
    }
fn deserialize_option < V > ( self , visitor : V ) -> Result < V :: Value , Self :: Error > where V : Visitor < ' de > , { // for now, we never visit options ( and therefore ignore part of the type ) self . calls . push ( Tokens :: Option ) ; if self . magic == 0 { visitor . visit_none ( ) } else { visitor . visit_some ( MockDeserializer { calls : self . calls , magic : self . magic . saturating_sub ( 1 ) , } ) } }
Hint that the `Deserialize` type is expecting an optional value.
Hint that the ` Deserialize ` type is expecting an optional value .
self
visitor
V
self
visitor
V