pub struct DrawingData {
pub kind: String,
pub anchors: Vec<Anchor>,
pub style: DrawingStyle,
pub params: Vec<(String, Param)>,
}Expand description
Format-independent saved form of a drawing: what
DrawingTool::save returns and what factories build drawings from.
§Examples
use ferrochart_core::drawing::{Anchor, DrawingData, Param};
let mut data = DrawingData::new("text", vec![Anchor { time: 0, price: 10.0 }]);
data.set("text", Param::Text("breakout".into()));
assert_eq!(data.text("text"), Some("breakout"));Fields§
§kind: StringTool kind, e.g. "trend_line" (see BUILTIN_KINDS).
anchors: Vec<Anchor>Anchors.
style: DrawingStyleStyle.
params: Vec<(String, Param)>Tool-specific parameters, by key.
Implementations§
Trait Implementations§
Source§impl Clone for DrawingData
impl Clone for DrawingData
Source§impl Debug for DrawingData
impl Debug for DrawingData
Source§impl PartialEq for DrawingData
impl PartialEq for DrawingData
impl StructuralPartialEq for DrawingData
Auto Trait Implementations§
impl Forget for DrawingData
impl Freeze for DrawingData
impl Move for DrawingData
impl RefUnwindSafe for DrawingData
impl Send for DrawingData
impl Sync for DrawingData
impl Unpin for DrawingData
impl UnsafeUnpin for DrawingData
impl UnwindSafe for DrawingData
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
Mutably borrows from an owned value. Read more