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)
GLL(GllData)
RMC(RmcData)
NoConnection
InvalidBytes
InvalidSentence

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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 !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.