Enum adafruit_gps::GpsSentence [−][src]
pub enum GpsSentence { GGA(GgaData), VTG(VtgData), GSA(GsaData), GSV(Vec<Satellites>), GLL(GllData), RMC(RmcData), NoConnection, InvalidBytes, InvalidSentence, }
Expand description
Enum for the gps.update() method.
Variants
GGA(GgaData)
VTG(VtgData)
GSA(GsaData)
GSV(Vec<Satellites>)
GLL(GllData)
RMC(RmcData)
Implementations
Reads a bytes file of structs to a vector.
Benches at 263,860ns to read a 1,000 long vec.
Append a GpsSentence struct to a file. If you wish to write a vector of bytes, run it over an iterator and add each struct individually. You must clone the struct that is being iterated over.
use adafruit_gps::GpsSentence; let v: Vec<GpsSentence> = vec![GpsSenence]; for s in v.iter() { s.clone().append_to("vector"); } let read: Vec<GpsSentence> = GpsSentence::read_from("vec_test");
Benches at 55,000,000 ns (0.05 s) for a 1,000 long vector, both as append directly or when iterating over a vector.
Append with a \n (10) byte at the end so it can be read back into a vector.
Trait Implementations
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for GpsSentence
impl Send for GpsSentence
impl Sync for GpsSentence
impl Unpin for GpsSentence
impl UnwindSafe for GpsSentence
Blanket Implementations
Mutably borrows from an owned value. Read more