Files
gpx.studio/gpx-rs/src/gpx/track.rs
T

33 lines
681 B
Rust
Raw Normal View History

2026-10-02 18:06:45 +02:00
use uuid::Uuid;
2026-09-18 09:03:51 +02:00
use crate::gpx::{Link, TrackSegment};
2026-10-02 18:06:45 +02:00
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct TrackId(Uuid);
impl Default for TrackId {
fn default() -> Self {
Self(Uuid::new_v4())
}
}
2026-10-01 18:42:31 +02:00
#[derive(Debug, Default, PartialEq)]
2026-09-18 09:03:51 +02:00
pub struct Track {
2026-10-02 18:06:45 +02:00
pub id: TrackId,
2026-09-18 09:03:51 +02:00
pub info: TrackInfo,
pub trkseg: Vec<TrackSegment>,
}
2026-10-01 18:42:31 +02:00
#[derive(Debug, Default, PartialEq)]
2026-09-18 09:03:51 +02:00
pub struct TrackInfo {
pub name: Option<String>,
pub cmt: Option<String>,
pub desc: Option<String>,
pub src: Option<String>,
pub link: Option<Link>,
pub type_: Option<String>,
pub color: Option<String>,
pub opacity: Option<f64>,
pub width: Option<f64>,
}