#[derive(Ron)]
{
// Attributes available to this derive:
#[ron]
}
Expand description
Derive macro that implements ToRon, FromRon, and RonSchema.
This is a convenience macro that combines all three derives.
§Example
ⓘ
use ron2_derive::Ron;
#[derive(Debug, PartialEq, Ron)]
struct Point {
x: f32,
y: f32,
}
let point = Point { x: 1.0, y: 2.0 };
let ron = point.to_ron().unwrap();
let parsed: Point = Point::from_ron(&ron).unwrap();
let schema = Point::schema();