forked from alemi/upub
feat: plce and profile
This commit is contained in:
parent
680c61ff9a
commit
49cf3205c4
2 changed files with 25 additions and 0 deletions
17
src/activitystream/object/place.rs
Normal file
17
src/activitystream/object/place.rs
Normal 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;
|
||||||
|
}
|
8
src/activitystream/object/profile.rs
Normal file
8
src/activitystream/object/profile.rs
Normal 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 {
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue