pub struct PositionLite {
pub latitude_i: i32,
pub longitude_i: i32,
pub altitude: i32,
pub time: u32,
pub location_source: i32,
}Expand description
Position with static location information only for NodeDBLite
Fields§
§latitude_i: i32The new preferred location encoding, multiply by 1e-7 to get degrees in floating point
longitude_i: i32TODO: REPLACE
altitude: i32In meters above MSL (but see issue #359)
time: u32This is usually not sent over the mesh (to save space), but it is sent from the phone so that the local device can set its RTC If it is sent over the mesh (because there are devices on the mesh without GPS), it will only be sent by devices which has a hardware GPS clock. seconds since 1970
location_source: i32TODO: REPLACE
Implementations§
Source§impl PositionLite
impl PositionLite
Sourcepub fn location_source(&self) -> LocSource
pub fn location_source(&self) -> LocSource
Returns the enum value of location_source, or the default if the field is set to an invalid enum value.
Sourcepub fn set_location_source(&mut self, value: LocSource)
pub fn set_location_source(&mut self, value: LocSource)
Sets location_source to the provided enum value.
Trait Implementations§
Source§impl Clone for PositionLite
impl Clone for PositionLite
Source§fn clone(&self) -> PositionLite
fn clone(&self) -> PositionLite
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PositionLite
impl Debug for PositionLite
Source§impl Default for PositionLite
impl Default for PositionLite
Source§impl<'de> Deserialize<'de> for PositionLite
impl<'de> Deserialize<'de> for PositionLite
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 Hash for PositionLite
impl Hash for PositionLite
Source§impl Message for PositionLite
impl Message for PositionLite
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for PositionLite
impl PartialEq for PositionLite
Source§fn eq(&self, other: &PositionLite) -> bool
fn eq(&self, other: &PositionLite) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PositionLite
impl Serialize for PositionLite
impl Copy for PositionLite
impl Eq for PositionLite
impl StructuralPartialEq for PositionLite
Auto Trait Implementations§
impl Freeze for PositionLite
impl RefUnwindSafe for PositionLite
impl Send for PositionLite
impl Sync for PositionLite
impl Unpin for PositionLite
impl UnsafeUnpin for PositionLite
impl UnwindSafe for PositionLite
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