rustyfit 0.5.0

This project hosts the Rust implementation for The Flexible and Interoperable Data Transfer (FIT) Protocol
Documentation
// Code generated by fitgen/main.go. DO NOT EDIT.

// Copyright 2025 The RustyFIT Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

#![allow(unused, clippy::match_single_binding)]

use std::fmt;

#[derive(Clone, Copy, PartialEq)]
pub struct Activity(pub u8);

impl Activity {
    pub const MANUAL: Activity = Activity(0);
    pub const AUTO_MULTI_SPORT: Activity = Activity(1);
}

impl Default for Activity {
    fn default() -> Self {
        Self(u8::MAX)
    }
}

impl fmt::Display for Activity {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        match self.0 {
            0 => write!(f, "manual"),
            1 => write!(f, "auto_multi_sport"),
            _ => write!(f, "Activity({})", self.0),
        }
    }
}

impl fmt::Debug for Activity {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        match self.0 {
            0 => write!(f, "Activity::MANUAL(0)"),
            1 => write!(f, "Activity::AUTO_MULTI_SPORT(1)"),
            _ => write!(f, "Activity({})", self.0),
        }
    }
}