Add setters to Location
@@ -10,3 +10,19 @@ pub struct Location {
/// Latitude as defined by sender.
pub latitude: f64,
}
+
+impl Location {
+ pub fn new(longitude: f64, latitude: f64) -> Self {
+ Self { longitude, latitude }
+ }
+
+ pub fn latitude(mut self, val: f64) -> Self {
+ self.latitude = val;
+ self
+ }
+
+ pub fn longitude(mut self, val: f64) -> Self {
+ self.longitude = val;
+ self
+ }
+}
