pub struct PlaceProperties {
pub accuracy: Option<XsdFloat>,
pub altitude: Option<XsdFloat>,
pub latitude: Option<XsdFloat>,
pub longitude: Option<XsdFloat>,
pub radius: Option<XsdFloat>,
pub units: Option<PlacePropertiesUnitsEnum>,
}Expand description
Define all the properties of the Location type as described by the Activity Streams vocabulary.
Fields§
§accuracy: Option<XsdFloat>Indicates the accuracy of position coordinates on a Place objects.
Expressed in properties of percentage. e.g. “94.0“means “94.0% accurate”.
- Range:
xsd:float[>= 0.0f, <= 100.0f] - Functional: true
altitude: Option<XsdFloat>Indicates the altitude of a place. The measurement units is indicated using the units property.
If units is not specified, the default is assumed to be “m” indicating meters.
- Range:
xsd:float - Functional: true
latitude: Option<XsdFloat>The latitude of a place.
- Range:
xsd:float - Functional: true
longitude: Option<XsdFloat>The longitude of a place.
- Range:
xsd:float - Functional: true
radius: Option<XsdFloat>The radius from the given latitude and longitude for a Place.
The units is expressed by the units property. If units is not specified, the default is assumed to be “m” indicating meters.
- Range:
xsd:float - Functional: true
units: Option<PlacePropertiesUnitsEnum>Specifies the measurement units for the radius and altitude properties on a Place object.
If not specified, the default is assumed to be “m” for meters.
- Range:
"cm"|"feet"|"inches"|"km"|"m"|xsd:anyUri|xsd:anyUri - Functional: true
Implementations§
Source§impl PlaceProperties
impl PlaceProperties
Sourcepub fn get_accuracy(&self) -> Option<&XsdFloat>
pub fn get_accuracy(&self) -> Option<&XsdFloat>
Get accuracy as a XsdFloat
This returns None if there is no value present
Sourcepub fn set_accuracy<T>(
&mut self,
item: T,
) -> Result<&mut Self, <T as TryInto<XsdFloat>>::Error>
pub fn set_accuracy<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdFloat>>::Error>
Set the accuracy with a type that can be converted into XsdFloat
Sourcepub fn get_altitude(&self) -> Option<&XsdFloat>
pub fn get_altitude(&self) -> Option<&XsdFloat>
Get altitude as a XsdFloat
This returns None if there is no value present
Sourcepub fn set_altitude<T>(
&mut self,
item: T,
) -> Result<&mut Self, <T as TryInto<XsdFloat>>::Error>
pub fn set_altitude<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdFloat>>::Error>
Set the altitude with a type that can be converted into XsdFloat
Sourcepub fn get_latitude(&self) -> Option<&XsdFloat>
pub fn get_latitude(&self) -> Option<&XsdFloat>
Get latitude as a XsdFloat
This returns None if there is no value present
Sourcepub fn set_latitude<T>(
&mut self,
item: T,
) -> Result<&mut Self, <T as TryInto<XsdFloat>>::Error>
pub fn set_latitude<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdFloat>>::Error>
Set the latitude with a type that can be converted into XsdFloat
Sourcepub fn get_longitude(&self) -> Option<&XsdFloat>
pub fn get_longitude(&self) -> Option<&XsdFloat>
Get longitude as a XsdFloat
This returns None if there is no value present
Sourcepub fn set_longitude<T>(
&mut self,
item: T,
) -> Result<&mut Self, <T as TryInto<XsdFloat>>::Error>
pub fn set_longitude<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdFloat>>::Error>
Set the longitude with a type that can be converted into XsdFloat
Sourcepub fn get_radius(&self) -> Option<&XsdFloat>
pub fn get_radius(&self) -> Option<&XsdFloat>
Get radius as a XsdFloat
This returns None if there is no value present
Sourcepub fn set_radius<T>(
&mut self,
item: T,
) -> Result<&mut Self, <T as TryInto<XsdFloat>>::Error>
pub fn set_radius<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdFloat>>::Error>
Set the radius with a type that can be converted into XsdFloat
Sourcepub fn get_units_length(&self) -> Option<&Length>
pub fn get_units_length(&self) -> Option<&Length>
Get units as a Length
This returns None if
- There is no value present
- The requested type is not the stored type
Sourcepub fn set_units_length<T>(
&mut self,
item: T,
) -> Result<&mut Self, <T as TryInto<Length>>::Error>
pub fn set_units_length<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<Length>>::Error>
Set units with a value that can be converted into Length
Sourcepub fn get_units_xsd_any_uri(&self) -> Option<&XsdAnyUri>
pub fn get_units_xsd_any_uri(&self) -> Option<&XsdAnyUri>
Get units as a XsdAnyUri
This returns None if
- There is no value present
- The requested type is not the stored type
Trait Implementations§
Source§impl AsMut<PlaceProperties> for Place
impl AsMut<PlaceProperties> for Place
Source§fn as_mut(&mut self) -> &mut PlaceProperties
fn as_mut(&mut self) -> &mut PlaceProperties
Source§impl AsRef<PlaceProperties> for Place
impl AsRef<PlaceProperties> for Place
Source§fn as_ref(&self) -> &PlaceProperties
fn as_ref(&self) -> &PlaceProperties
Source§impl Clone for PlaceProperties
impl Clone for PlaceProperties
Source§fn clone(&self) -> PlaceProperties
fn clone(&self) -> PlaceProperties
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more