Skip to main content

oxilean_codegen/opt_strength/
strengthconfig_traits.rs

1//! # StrengthConfig - Trait Implementations
2//!
3//! This module contains trait implementations for `StrengthConfig`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Default`
8//! - `Display`
9//!
10//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
11
12use crate::lcnf::*;
13
14use super::types::StrengthConfig;
15use std::fmt;
16
17impl Default for StrengthConfig {
18    fn default() -> Self {
19        StrengthConfig {
20            max_shift_count: 3,
21            optimize_div: true,
22            optimize_inc: true,
23        }
24    }
25}
26
27impl fmt::Display for StrengthConfig {
28    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
29        write!(
30            f,
31            "StrengthConfig {{ max_shift={}, opt_div={}, opt_inc={} }}",
32            self.max_shift_count, self.optimize_div, self.optimize_inc
33        )
34    }
35}