[][src]Trait justconfig::processors::Unescape

pub trait Unescape where
    Self: Sized
{ pub fn unescape(self) -> Result<StringItem, ConfigError>; }

Convert escape sequences to special characters.

Required methods

Loading content...

Implementations on Foreign Types

impl Unescape for Result<StringItem, ConfigError>[src]

pub fn unescape(self) -> Result<StringItem, ConfigError>[src]

Call this method to convert escaped control characters to real control characters.

The following control characters can be used:

  • \n
  • \r
  • \t

Example

defaults.set(conf.root().push_all(&["myitem"]), r#"\r\n"#, "source info");
conf.add_source(defaults);

let value: String = conf.get(ConfPath::from(&["myitem"])).unescape().value().unwrap();

assert_eq!(value, "\r\n");
Loading content...

Implementors

Loading content...