Skip to main content

Marker

Enum Marker 

Source
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

§corner: Option<f32>

Corner radius, CSS pixels, or units in a diagram; the theme’s corner unless set.

§

Gauge

A shape’s outline, filled to fill from 0 to 1: around a circle, up other shapes.

Fields

§fill: Expr

How full each row’s gauge is.

§shape: Shape

The outline.

§

Pie

A circle cut into slices, each as large as its value.

Fields

§slices: Vec<Expr>

Each slice’s value.

§colors: Vec<Color>

Each slice’s color.

§hole: f32

The hole in the middle, as a fraction of the radius.

§

Icon

One of images, fitted in the marker’s box; index picks which for each row.

Fields

§images: Vec<Image>

The images.

§index: Expr

Each row’s image, from 0.

§

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.

Fields

§source: Arc<str>

The function’s source.

§inputs: Vec<Expr>

Each row’s inputs.

Implementations§

Source§

impl<'de> Marker

Source

pub fn deserialize<__D>(__deserializer: __D) -> Result<Marker, __D::Error>
where __D: Deserializer<'de>,

Source§

impl Marker

Source

pub fn block() -> Marker

A block with the theme’s corners.

Trait Implementations§

Source§

impl Clone for Marker

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Marker

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Marker

Source§

fn default() -> Marker

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Marker

Source§

fn deserialize<D: Deserializer<'de>>( deserializer: D, ) -> Result<Marker, D::Error>

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<Shape> for Marker

Source§

fn from(shape: Shape) -> Marker

Converts to this type from the input type.
Source§

impl JsonSchema for Marker

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

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

Generates a JSON Schema for this type. Read more
Source§

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 more
Source§

impl PartialEq for Marker

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Marker

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,