Expand description
§Serde Str
Documentation | Github | Crate
A (de)serializer for anything that has implemented FromStr
/ Display
but does not have Serialize
/Deserialize
.
§Example
#[macro_use]
extern crate serde_derive;
extern crate serde;
extern crate serde_str;
use std::net::IpAddr;
#[derive(Serialize, Deserialize)]
struct Timestamps {
#[serde(with = "serde_str")]
pattern: IpAddr,
}
Functions§
- deserialize
- Deserialize function, see crate docs to see how to use it
- serialize
- Serialize function, see crate docs to see how to use it