esyn 0.5.1

Rusty Config File Parser.
Documentation

[WIP] esyn

Rusty Config File Parser.

Example

use esyn::{Esyn, EsynDe};

fn main() {
    let config = r#"
fn main() {
    let a = Other {
_string: "hello",
_vec_u8: [1, 2, 4],
_opt: Some(-9223372036854775807i64),
    };
}
"#;

    let mut esyn = Esyn::new(&config).unwrap();
    esyn.update::<Other>("main").unwrap();

    let other = &esyn.get::<Other>("main", "a").unwrap();

    dbg!(other);
}

#[derive(Debug, Default, EsynDe)]
struct Other {
    _string: String,
    _vec_u8: Vec<u8>,
    _opt: Option<i64>,
}

For more examples take a look on tests

Supported Types

u8 u16 u32 u64 u128 usize
i8 i16 i32 i64 i128 isize
f32 f64
bool
char String

Vec<T>
Option<T>
HashMap<K, V>
BTreeMap<K, V>

Option<IpAddr>
Option<Ipv4Addr>
Option<Ipv6Addr>

Struct
Enum
Tuple

fast_image_resize::FilterType

?Box<T>

TODO

to_string() Debug -> ? Default -> ?