Skip to main content

PlaceProperties

Struct PlaceProperties 

Source
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

Source

pub fn get_accuracy(&self) -> Option<&XsdFloat>

Get accuracy as a XsdFloat

This returns None if there is no value present

Source

pub fn set_accuracy<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdFloat>>::Error>
where T: TryInto<XsdFloat>,

Set the accuracy with a type that can be converted into XsdFloat

Source

pub fn get_altitude(&self) -> Option<&XsdFloat>

Get altitude as a XsdFloat

This returns None if there is no value present

Source

pub fn set_altitude<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdFloat>>::Error>
where T: TryInto<XsdFloat>,

Set the altitude with a type that can be converted into XsdFloat

Source

pub fn get_latitude(&self) -> Option<&XsdFloat>

Get latitude as a XsdFloat

This returns None if there is no value present

Source

pub fn set_latitude<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdFloat>>::Error>
where T: TryInto<XsdFloat>,

Set the latitude with a type that can be converted into XsdFloat

Source

pub fn get_longitude(&self) -> Option<&XsdFloat>

Get longitude as a XsdFloat

This returns None if there is no value present

Source

pub fn set_longitude<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdFloat>>::Error>
where T: TryInto<XsdFloat>,

Set the longitude with a type that can be converted into XsdFloat

Source

pub fn get_radius(&self) -> Option<&XsdFloat>

Get radius as a XsdFloat

This returns None if there is no value present

Source

pub fn set_radius<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdFloat>>::Error>
where T: TryInto<XsdFloat>,

Set the radius with a type that can be converted into XsdFloat

Source

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
Source

pub fn set_units_length<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<Length>>::Error>
where T: TryInto<Length>,

Set units with a value that can be converted into Length

Source

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
Source

pub fn set_units_xsd_any_uri<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error>
where T: TryInto<XsdAnyUri>,

Set units with a value that can be converted into XsdAnyUri

Trait Implementations§

Source§

impl AsMut<PlaceProperties> for Place

Source§

fn as_mut(&mut self) -> &mut PlaceProperties

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<PlaceProperties> for Place

Source§

fn as_ref(&self) -> &PlaceProperties

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for PlaceProperties

Source§

fn clone(&self) -> PlaceProperties

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PlaceProperties

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PlaceProperties

Source§

fn default() -> PlaceProperties

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for PlaceProperties

Source§

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 Serialize for PlaceProperties

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,