pub struct PositionOptions {
pub enable_high_accuracy: bool,
pub timeout: u32,
pub maximum_age: u32,
}Fields§
§enable_high_accuracy: boolHigh accuracy mode (such as GPS, if available) Will be ignored on Android 12+ if users didn’t grant the ACCESS_FINE_LOCATION permission.
timeout: u32The maximum wait time in milliseconds for location updates. Default: 10000 On Android the timeout gets ignored for getCurrentPosition. Ignored on iOS.
maximum_age: u32The maximum age in milliseconds of a possible cached position that is acceptable to return. Default: 0 Ignored on iOS.
Trait Implementations§
source§impl Clone for PositionOptions
impl Clone for PositionOptions
source§fn clone(&self) -> PositionOptions
fn clone(&self) -> PositionOptions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for PositionOptions
impl Debug for PositionOptions
source§impl Default for PositionOptions
impl Default for PositionOptions
source§fn default() -> PositionOptions
fn default() -> PositionOptions
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for PositionOptions
impl<'de> Deserialize<'de> for PositionOptions
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 NamedType for PositionOptions
impl NamedType for PositionOptions
fn sid() -> SpectaID
source§fn named_data_type(
type_map: &mut TypeMap,
generics: &[DataType],
) -> NamedDataType
fn named_data_type( type_map: &mut TypeMap, generics: &[DataType], ) -> NamedDataType
this is equivalent to Type::inline but returns a NamedDataType instead.
source§fn definition_named_data_type(type_map: &mut TypeMap) -> NamedDataType
fn definition_named_data_type(type_map: &mut TypeMap) -> NamedDataType
this is equivalent to [Type::definition] but returns a NamedDataType instead.
source§impl Serialize for PositionOptions
impl Serialize for PositionOptions
source§impl Type for PositionOptions
impl Type for PositionOptions
source§fn inline(type_map: &mut TypeMap, generics: Generics<'_>) -> DataType
fn inline(type_map: &mut TypeMap, generics: Generics<'_>) -> DataType
Returns the definition of a type using the provided generics. Read more
source§fn reference(type_map: &mut TypeMap, generics: &[DataType]) -> Reference
fn reference(type_map: &mut TypeMap, generics: &[DataType]) -> Reference
Generates a datatype corresponding to a reference to this type,
as determined by its category. Getting a reference to a type implies that
it should belong in the type map (since it has to be referenced from somewhere),
so the output of
definition will be put into the type map.impl Flatten for PositionOptions
Auto Trait Implementations§
impl Freeze for PositionOptions
impl RefUnwindSafe for PositionOptions
impl Send for PositionOptions
impl Sync for PositionOptions
impl Unpin for PositionOptions
impl UnwindSafe for PositionOptions
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)