mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-24 22:59:58 -07:00
brk: first commit
This commit is contained in:
35
_src/structs/map_value.rs
Normal file
35
_src/structs/map_value.rs
Normal file
@@ -0,0 +1,35 @@
|
||||
use std::fmt::{Debug, Display};
|
||||
|
||||
use allocative::Allocative;
|
||||
use bincode::{Decode, Encode};
|
||||
use serde::{de::DeserializeOwned, Serialize};
|
||||
|
||||
use super::{Date, Height, Timestamp, OHLC};
|
||||
|
||||
pub trait MapValue:
|
||||
Clone
|
||||
+ Copy
|
||||
+ Default
|
||||
+ Debug
|
||||
+ Serialize
|
||||
+ DeserializeOwned
|
||||
+ Encode
|
||||
+ Decode
|
||||
+ Sync
|
||||
+ Send
|
||||
+ Allocative
|
||||
+ Display
|
||||
{
|
||||
}
|
||||
|
||||
impl MapValue for u8 {}
|
||||
impl MapValue for u16 {}
|
||||
impl MapValue for u32 {}
|
||||
impl MapValue for u64 {}
|
||||
impl MapValue for usize {}
|
||||
impl MapValue for f32 {}
|
||||
impl MapValue for f64 {}
|
||||
impl MapValue for Date {}
|
||||
impl MapValue for OHLC {}
|
||||
impl MapValue for Height {}
|
||||
impl MapValue for Timestamp {}
|
||||
Reference in New Issue
Block a user