Skip to main content

oxilean_std/arithmetic_geometry/
neronmodel_traits.rs

1//! # NeronModel - Trait Implementations
2//!
3//! This module contains trait implementations for `NeronModel`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Display`
8//!
9//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
10
11use super::types::{NeronModel, NeronReductionType};
12use std::fmt;
13
14impl std::fmt::Display for NeronModel {
15    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16        let red = match self.reduction_type {
17            NeronReductionType::Good => "good",
18            NeronReductionType::SemiStable => "semi-stable",
19            NeronReductionType::PurelyToric => "purely toric",
20            NeronReductionType::Additive => "additive",
21        };
22        write!(
23            f,
24            "Néron model of {}/{} over {} ({})",
25            self.variety, self.fraction_field, self.dvr, red
26        )
27    }
28}