pub struct LatLong {
pub lat: f64,
pub long: f64,
}Expand description
Represents a geo-location with latitude and longitude. It can be constructed from a String.
§Example
use std::convert::TryFrom;
use av_stream_info_rust::LatLong;
let lat_long_str = String::from("10.1,-3.1");
let lat_long = LatLong::try_from(lat_long_str).unwrap();
println!("{},{}", lat_long.lat, lat_long.long);Fields§
§lat: f64Latitude
long: f64Longitude
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LatLong
impl<'de> Deserialize<'de> for LatLong
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
Auto Trait Implementations§
impl Freeze for LatLong
impl RefUnwindSafe for LatLong
impl Send for LatLong
impl Sync for LatLong
impl Unpin for LatLong
impl UnwindSafe for LatLong
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