parent
7adf624dee
commit
4d10eef55d
@ -541,7 +541,9 @@ pub trait Visitor {
|
|||||||
Err(Error::type_mismatch(Type::Str))
|
Err(Error::type_mismatch(Type::Str))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// `visit_string` deserializes a `String` into a `Value`.
|
/// `visit_string` deserializes a `String` into a `Value`. This allows a deserializer to avoid
|
||||||
|
/// a copy if it is deserializing a string from a `String` type. By default it passes a `&str`
|
||||||
|
/// to the `visit_str` method.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn visit_string<E>(&mut self, v: String) -> Result<Self::Value, E>
|
fn visit_string<E>(&mut self, v: String) -> Result<Self::Value, E>
|
||||||
where E: Error,
|
where E: Error,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user