pricer: snapshot

This commit is contained in:
nym21
2025-02-14 19:02:46 +01:00
parent a1006dddb5
commit ed10dccfe2
22 changed files with 692 additions and 410 deletions
+27 -1
View File
@@ -2,7 +2,24 @@ use derive_deref::Deref;
use serde::Serialize;
use zerocopy::{FromBytes, Immutable, IntoBytes, KnownLayout};
#[derive(Debug, Default, Clone, Copy, FromBytes, Immutable, IntoBytes, KnownLayout, Deref, Serialize)]
use super::Close;
#[derive(
Debug,
Default,
PartialEq,
Eq,
PartialOrd,
Ord,
Clone,
Copy,
FromBytes,
Immutable,
IntoBytes,
KnownLayout,
Deref,
Serialize,
)]
#[repr(C)]
pub struct High<T>(T);
impl<T> From<T> for High<T> {
@@ -10,3 +27,12 @@ impl<T> From<T> for High<T> {
Self(value)
}
}
impl<T> From<Close<T>> for High<T>
where
T: Copy,
{
fn from(value: Close<T>) -> Self {
Self(*value)
}
}