pub enum BackendKind {
WebGpu,
WebGl2,
Canvas2D,
}Expand description
The rendering backend a chart is running on.
The backend is chosen at run time: the chart asks for WebGPU, falls back to WebGL2, and falls back again to Canvas2D. From the outside the three look identical, because they all replay the same display list.
Variants§
WebGpu
WebGPU: the fastest backend, and the one the chart prefers.
Vector geometry is tessellated into triangle batches and uploaded to the GPU once; a steady-state frame issues a handful of draw calls and touches no JavaScript.
WebGl2
WebGL2: the GPU fallback for browsers without WebGPU.
The same batches as WebGPU, drawn through WebGL2 instancing.
Canvas2D
Canvas2D: the universal fallback.
The display list is replayed as immediate-mode canvas calls. Slower than the GPU backends, but it works everywhere.
Implementations§
Trait Implementations§
Source§impl Clone for BackendKind
impl Clone for BackendKind
impl Copy for BackendKind
Source§impl Debug for BackendKind
impl Debug for BackendKind
Source§impl Default for BackendKind
impl Default for BackendKind
impl Eq for BackendKind
Source§impl Hash for BackendKind
impl Hash for BackendKind
Source§impl PartialEq for BackendKind
impl PartialEq for BackendKind
impl StructuralPartialEq for BackendKind
Auto Trait Implementations§
impl Freeze for BackendKind
impl RefUnwindSafe for BackendKind
impl Send for BackendKind
impl Sync for BackendKind
impl Unpin for BackendKind
impl UnsafeUnpin for BackendKind
impl UnwindSafe for BackendKind
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