pub struct MockLocation {
pub latitude: f64,
pub longitude: f64,
pub horizontal_accuracy: Option<f64>,
pub live_period: Option<LivePeriod>,
pub heading: Option<u16>,
pub proximity_alert_radius: Option<u32>,
}Fields§
§latitude: f64§longitude: f64§horizontal_accuracy: Option<f64>§live_period: Option<LivePeriod>§heading: Option<u16>§proximity_alert_radius: Option<u32>Implementations§
Source§impl MockLocation
impl MockLocation
Sourcepub fn latitude(self, value: impl Into<f64>) -> Self
pub fn latitude(self, value: impl Into<f64>) -> Self
Sets the latitude value of the MockLocation to value, converting it via Into trait.
Sourcepub fn longitude(self, value: impl Into<f64>) -> Self
pub fn longitude(self, value: impl Into<f64>) -> Self
Sets the longitude value of the MockLocation to value, converting it via Into trait.
Sourcepub fn horizontal_accuracy<T: Into<f64>>(self, value: T) -> Self
pub fn horizontal_accuracy<T: Into<f64>>(self, value: T) -> Self
Sets the horizontal_accuracy value of the MockLocation to value, converting it to needed Option type.
Sourcepub fn live_period<T: Into<LivePeriod>>(self, value: T) -> Self
pub fn live_period<T: Into<LivePeriod>>(self, value: T) -> Self
Sets the live_period value of the MockLocation to value, converting it to needed Option type.
Sourcepub fn heading<T: Into<u16>>(self, value: T) -> Self
pub fn heading<T: Into<u16>>(self, value: T) -> Self
Sets the heading value of the MockLocation to value, converting it to needed Option type.
Sourcepub fn proximity_alert_radius<T: Into<u32>>(self, value: T) -> Self
pub fn proximity_alert_radius<T: Into<u32>>(self, value: T) -> Self
Sets the proximity_alert_radius value of the MockLocation to value, converting it to needed Option type.
Source§impl MockLocation
impl MockLocation
Trait Implementations§
Source§impl Clone for MockLocation
impl Clone for MockLocation
Source§fn clone(&self) -> MockLocation
fn clone(&self) -> MockLocation
Returns a duplicate 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 From<MockLocation> for Location
impl From<MockLocation> for Location
Source§fn from(mock: MockLocation) -> Self
fn from(mock: MockLocation) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MockLocation
impl RefUnwindSafe for MockLocation
impl Send for MockLocation
impl Sync for MockLocation
impl Unpin for MockLocation
impl UnwindSafe for MockLocation
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> Erasable for T
impl<T> Erasable for T
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more