omics_coordinate/system/interbase.rs
1//! The interbase coordinate system.
2
3use crate::system::System;
4
5////////////////////////////////////////////////////////////////////////////////////////
6// Assertions
7////////////////////////////////////////////////////////////////////////////////////////
8
9const _: () = {
10 use std::mem::size_of;
11
12 // This should never take up any space.
13 assert!(size_of::<Interbase>() == 0);
14};
15
16////////////////////////////////////////////////////////////////////////////////////////
17// Interbase coordinate system
18////////////////////////////////////////////////////////////////////////////////////////
19
20/// The interbase coordinate system.
21///
22/// This coordinate system is also known as the "0-based, half-open" coordinate
23/// system.
24#[derive(Copy, Clone, Debug, Default, Eq, Ord, PartialEq, PartialOrd)]
25pub struct Interbase;
26
27impl Interbase {
28 /// A static string representing the name of the interbase coordinate
29 /// system.
30 pub const NAME: &str = "interbase coordinate system";
31}
32
33impl System for Interbase {}
34
35impl std::fmt::Display for Interbase {
36 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
37 write!(f, "{}", Self::NAME)
38 }
39}