pub enum Shape {
Rect {
x: f32,
y: f32,
w: f32,
h: f32,
fill: Option<String>,
stroke: Option<String>,
radius: f32,
},
Circle {
x: f32,
y: f32,
r: f32,
fill: Option<String>,
stroke: Option<String>,
},
Line {
points: Vec<[f32; 2]>,
stroke: Option<String>,
width: f32,
},
Text {
x: f32,
y: f32,
text: String,
color: Option<String>,
size: f32,
},
}Expand description
One canvas shape ("type" in JSON). Colors are theme role names (accent, text_dim,
border, …), chart1…chart8, or #rrggbb.
Variants§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Shape
impl<'de> Deserialize<'de> for Shape
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>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Shape
Auto Trait Implementations§
impl Forget for Shape
impl Freeze for Shape
impl Move for Shape
impl RefUnwindSafe for Shape
impl Send for Shapewhere
RawVecInner: Send,
impl Sync for Shapewhere
RawVecInner: Sync,
impl Unpin for Shape
impl UnsafeUnpin for Shapewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<[f32; 2]>: UnsafeUnpin,
impl UnwindSafe for Shapewhere
RawVecInner: UnwindSafe,
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