feat: plce and profile

This commit is contained in:
əlemi 2024-03-20 05:44:40 +01:00
parent 680c61ff9a
commit 49cf3205c4
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,17 @@
pub trait Place : super::Object {
fn accuracy(&self) -> Option<f64> { None }
fn altitude(&self) -> Option<f64> { None }
fn latitude(&self) -> Option<f64> { None }
fn longitude(&self) -> Option<f64> { None }
fn radius(&self) -> Option<f64> { None }
fn units(&self) -> Option<&str> { None }
}
pub trait PlaceMut : super::ObjectMut {
fn set_accuracy(&mut self, val: Option<f64>) -> &mut Self;
fn set_altitude(&mut self, val: Option<f64>) -> &mut Self;
fn set_latitude(&mut self, val: Option<f64>) -> &mut Self;
fn set_longitude(&mut self, val: Option<f64>) -> &mut Self;
fn set_radius(&mut self, val: Option<f64>) -> &mut Self;
fn set_units(&mut self, val: Option<&str>) -> &mut Self;
}

View file

@ -0,0 +1,8 @@
pub trait Profile : super::Object {
// not a Node because it's always embedded and one
fn describes(&self) -> Option<impl super::Object> { None::<serde_json::Value> }
}
impl Profile for serde_json::Value {
}