Skip to content

Examples

use other::schema::DateTime;
struct User {
first_name: string @1,
last_name: string @2,
birthday: DateTime @3,
gender: option<user::Gender> @4,
/// Latitude and longitude.
current_location: (f64, f64) @5,
/// Previous three locations.
///
/// Will be `(0.0, 0.0)` if there are less than three
/// history entries.
location_history: [(f64, f64); 3] @6,
}
mod user {
enum Gender {
Male @1,
Female @2,
NonBinary(string @1) @3,
}
}