Crate serde_regex

Source
Expand description

§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§

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

Functions§

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