haystack_types/
h_remove.rs1use num::Float;
2use crate::{HType, HVal, NumTrait};
3use crate::common::Txt;
4use std::fmt::{self,Write,Display};
5use std::str::FromStr;
6
7#[derive(PartialEq,Debug)]
8pub struct HRemove;
9
10pub const REMOVE: HRemove = HRemove {};
11
12const ZINC: Txt = Txt::Const("R");
13const JSON: Txt = Txt::Const("-:");
14
15const THIS_TYPE: HType = HType::Remove;
16
17impl <'a,T: NumTrait + 'a>HVal<'a,T> for HRemove {
18 fn to_zinc(&self, buf: &mut String) -> fmt::Result {
19 write!(buf,"{}",ZINC)
20 }
21 fn to_json(&self, buf: &mut String) -> fmt::Result {
22 write!(buf,"{}",JSON)
23 }
24 fn haystack_type(&self) -> HType { THIS_TYPE }
25
26 set_trait_eq_method!(get_remove_val,'a,T);
27 set_get_method!(get_remove_val, HRemove);
28}