pub trait Config {
const INCLUDE_TS_FIELDS: bool;
const FIXES: bool;
fn new(ranges: bool) -> Self;
fn ranges(&self) -> bool;
}
pub struct ConfigTS {
ranges: bool,
}
impl Config for ConfigTS {
const INCLUDE_TS_FIELDS: bool = true;
const FIXES: bool = false;
#[inline(always)]
fn new(ranges: bool) -> Self {
Self { ranges }
}
#[inline(always)]
fn ranges(&self) -> bool {
self.ranges
}
}
pub struct ConfigJS {
ranges: bool,
}
impl Config for ConfigJS {
const INCLUDE_TS_FIELDS: bool = false;
const FIXES: bool = false;
#[inline(always)]
fn new(ranges: bool) -> Self {
Self { ranges }
}
#[inline(always)]
fn ranges(&self) -> bool {
self.ranges
}
}
pub struct ConfigFixesTS {
ranges: bool,
}
impl Config for ConfigFixesTS {
const INCLUDE_TS_FIELDS: bool = true;
const FIXES: bool = true;
#[inline(always)]
fn new(ranges: bool) -> Self {
Self { ranges }
}
#[inline(always)]
fn ranges(&self) -> bool {
self.ranges
}
}
pub struct ConfigFixesJS {
ranges: bool,
}
impl Config for ConfigFixesJS {
const INCLUDE_TS_FIELDS: bool = false;
const FIXES: bool = true;
#[inline(always)]
fn new(ranges: bool) -> Self {
Self { ranges }
}
#[inline(always)]
fn ranges(&self) -> bool {
self.ranges
}
}