Expand description
Client module for establishing connections and managing communication with GPSD Asynchronous GPSD client implementation for communicating with the GPS daemon
This module provides the async client interface for connecting to and communicating with a GPSD server. It supports multiple connection types, data streaming formats, and protocol versions using async/await syntax.
For synchronous/blocking operations, see the blocking submodule.
§Example
use gpsd_json::client::{GpsdClient, StreamOptions};
use futures::StreamExt;
// Connect to GPSD asynchronously
let mut client = GpsdClient::connect("127.0.0.1:2947").await?;
// Get version info
let version = client.version().await?;
println!("GPSD version: {}", version.release);
// Start streaming GPS data
let mut stream = client.stream(StreamOptions::json()).await?;
while let Some(msg) = stream.next().await {
println!("GPS data: {:?}", msg?);
}Modules§
- blocking
- Blocking (synchronous) client implementation Blocking (synchronous) GPSD client implementation
Structs§
- Gpsd
Client Core - Core implementation of an asynchronous GPSD client
- Gpsd
Data Stream - Async stream for receiving GPS data from GPSD
- Json
- JSON format for structured GPS data
- Nmea
- NMEA format for raw GPS sentences
- Raw
- Raw format for unprocessed GPS data
- Stream
Options - Configuration options for GPS data streams
Traits§
- Gpsd
Json Protocol - Trait defining a GPSD protocol version implementation
- Stream
Format - Marker trait for data stream output formats
Type Aliases§
- Gpsd
Client - Type alias for an async GPSD client using protocol version 3