From f5d5e3c9c340a3ecc3fbd579bac0151c1a82587d Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 21 Sep 2017 17:28:13 +0200 Subject: [PATCH] Add getters --- lib/entry/libimagentrygps/src/types.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lib/entry/libimagentrygps/src/types.rs b/lib/entry/libimagentrygps/src/types.rs index 54a60cbf..b3e7afc2 100644 --- a/lib/entry/libimagentrygps/src/types.rs +++ b/lib/entry/libimagentrygps/src/types.rs @@ -49,6 +49,19 @@ impl GPSValue { seconds: s } } + + pub fn degree(&self) -> i8 { + self.degree + } + + pub fn minutes(&self) -> i8 { + self.minutes + } + + pub fn seconds(&self) -> i8 { + self.seconds + } + } @@ -119,6 +132,14 @@ impl Coordinates { latitude: lat, } } + + pub fn longitude(&self) -> &GPSValue { + &self.longitude + } + + pub fn latitude(&self) -> &GPSValue { + &self.latitude + } } impl Into for Coordinates {