pub struct StoredDrawing {
pub id: String,
pub points: Vec<StoredCoord>,
pub drawing: Drawing,
pub created_at: i64,
pub modified_at: i64,
pub notes: Option<String>,
pub pane: Option<StoredPane>,
}Expand description
A fully serializable representation of a drawing with all its properties.
This is the storage/wire format for drawings: the anchors as
(timestamp, price) coordinates and the Drawing itself for the tool
type and every setting. Convert between the two with drawing_to_stored
and stored_to_drawing.
Fields§
§id: StringUnique identifier (string for backend compatibility).
points: Vec<StoredCoord>Anchor points in (timestamp, price) coordinates.
drawing: DrawingTool type and settings; its id, points and completion state are not stored.
created_at: i64Creation ts
modified_at: i64Last modified ts
notes: Option<String>User notes
pane: Option<StoredPane>The study pane holding the drawing, which a chart resolves to its own pane with the same
studies, or to the price pane when it has none, since study ids are local to each chart.
None for the price pane, and in records written before it was stored, which keep the
study id in drawing.pane.
Implementations§
Trait Implementations§
Source§impl Clone for StoredDrawing
impl Clone for StoredDrawing
Source§fn clone(&self) -> StoredDrawing
fn clone(&self) -> StoredDrawing
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StoredDrawing
impl Debug for StoredDrawing
Source§impl<'de> Deserialize<'de> for StoredDrawing
impl<'de> Deserialize<'de> for StoredDrawing
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for StoredDrawing
impl RefUnwindSafe for StoredDrawing
impl Send for StoredDrawing
impl Sync for StoredDrawing
impl Unpin for StoredDrawing
impl UnsafeUnpin for StoredDrawing
impl UnwindSafe for StoredDrawing
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more