rustyfit 0.4.1

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 Autoscroll(pub u8);

impl Autoscroll {
    pub const NONE: Autoscroll = Autoscroll(0);
    pub const SLOW: Autoscroll = Autoscroll(1);
    pub const MEDIUM: Autoscroll = Autoscroll(2);
    pub const FAST: Autoscroll = Autoscroll(3);
}

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

impl fmt::Display for Autoscroll {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        match self.0 {
            0 => write!(f, "none"),
            1 => write!(f, "slow"),
            2 => write!(f, "medium"),
            3 => write!(f, "fast"),
            _ => write!(f, "Autoscroll({})", self.0),
        }
    }
}

impl fmt::Debug for Autoscroll {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        match self.0 {
            0 => write!(f, "Autoscroll::NONE(0)"),
            1 => write!(f, "Autoscroll::SLOW(1)"),
            2 => write!(f, "Autoscroll::MEDIUM(2)"),
            3 => write!(f, "Autoscroll::FAST(3)"),
            _ => write!(f, "Autoscroll({})", self.0),
        }
    }
}