[][src]Crate serde_regex

Serde Regex

Documentation | Github | Crate

A (de)serializer for regex::Regex

Example

use regex::Regex;
use serde::{Deserialize, Serialize};
use serde_derive::{Serialize, Deserialize};


#[derive(Serialize, Deserialize)]
struct Timestamps {
    #[serde(with = "serde_regex")]
    pattern: Regex,
}

Structs

Serde

A wrapper type which implements Serialize and Deserialize for types involving Regex

Functions

deserialize

Deserialize function, see crate docs to see how to use it

serialize

Deserialize function, see crate docs to see how to use it