[][src]Trait stdweb::web::RenderingContext

pub trait RenderingContext {
    type Error;
    fn from_canvas(canvas: &CanvasElement) -> Result<Self, Self::Error>
    where
        Self: Sized
; }

Trait implemented by rendering contexts which can be obtained from a canvas.

Associated Types

type Error

Type of error which can occur whilst creating this context

Loading content...

Required methods

fn from_canvas(canvas: &CanvasElement) -> Result<Self, Self::Error> where
    Self: Sized

Name which identifies this kind of rendering context.

Loading content...

Implementors

impl RenderingContext for CanvasRenderingContext2d[src]

type Error = ConversionError

Loading content...