pub enum Marker {
Shape(Shape),
Block {
corner: Option<f32>,
},
Gauge {
fill: Expr,
shape: Shape,
},
Pie {
slices: Vec<Expr>,
colors: Vec<Color>,
hole: f32,
},
Icon {
images: Vec<Image>,
index: Expr,
},
Wgsl {
source: Arc<str>,
inputs: Vec<Expr>,
},
}Expand description
How a vertex is drawn: a shape’s name, "block", or { shape | block | gauge | pie | icon | wgsl: options }.
Variants§
Shape(Shape)
A filled shape.
Block
A block: a rectangle with rounded corners, sized for diagrams.
Fields
Gauge
A shape’s outline, filled to fill from 0 to 1: around a circle, up other shapes.
Pie
A circle cut into slices, each as large as its value.
Fields
Icon
One of images, fitted in the marker’s box; index picks which for each row.
Wgsl
A marker in WGSL: source defines fn marker(f: MarkerFragment) -> MarkerColor, reading up to
eight inputs as f.input[i]. It compiles once, when the view first draws it.
Implementations§
Source§impl<'de> Marker
impl<'de> Marker
pub fn deserialize<__D>(__deserializer: __D) -> Result<Marker, __D::Error>where
__D: Deserializer<'de>,
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Marker
impl<'de> Deserialize<'de> for Marker
Source§fn deserialize<D: Deserializer<'de>>(
deserializer: D,
) -> Result<Marker, D::Error>
fn deserialize<D: Deserializer<'de>>( deserializer: D, ) -> Result<Marker, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for Marker
impl JsonSchema for Marker
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for Marker
Auto Trait Implementations§
impl Freeze for Marker
impl RefUnwindSafe for Marker
impl Send for Marker
impl Sync for Marker
impl Unpin for Marker
impl UnsafeUnpin for Marker
impl UnwindSafe for Marker
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