FromRon

Derive Macro FromRon 

Source
#[derive(FromRon)]
{
    // Attributes available to this derive:
    #[ron]
}
Expand description

Derive macro for deserializing from RON without serde.

§Example

use ron2_derive::FromRon;
use ron2::FromRon;

#[derive(FromRon)]
struct Point {
    x: f32,
    y: f32,
}

let point: Point = Point::from_ron("(x: 1.0, y: 2.0)").unwrap();