pub struct LatLng {
pub latitude: f64,
pub longitude: f64,
}
Expand description
LatLng
geoPointValue
inner type.
https://firebase.google.com/docs/firestore/reference/rest/Shared.Types/LatLng https://firebase.google.com/docs/firestore/reference/rest/Shared.Types/ArrayValue#Value
§Examples
let o = LatLng {
latitude: 1_f64,
longitude: 2_f64,
};
let v = Value {
value_type: Some(ValueType::GeoPointValue(
google::r#type::LatLng {
latitude: 1_f64,
longitude: 2_f64,
},
)),
};
let s = to_value(&o)?;
let d = from_value::<'_, LatLng>(&s)?;
assert_eq!(s, v);
assert_eq!(d, o);
Fields§
§latitude: f64
latitude
longitude: f64
longitude
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LatLng
impl<'de> Deserialize<'de> for LatLng
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<LatLng> for LatLng
impl From<LatLng> for LatLng
Source§fn from(_: GoogleApiProtoLatLng) -> Self
fn from(_: GoogleApiProtoLatLng) -> Self
Converts to this type from the input type.
impl Copy for LatLng
impl StructuralPartialEq for LatLng
Auto Trait Implementations§
impl Freeze for LatLng
impl RefUnwindSafe for LatLng
impl Send for LatLng
impl Sync for LatLng
impl Unpin for LatLng
impl UnwindSafe for LatLng
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request