pub(crate) trait WebGLExtension: Sized{
type Extension;
// Required methods
fn new(
cx: &mut JSContext,
ctx: &WebGLRenderingContext,
) -> DomRoot<Self::Extension>;
fn spec() -> WebGLExtensionSpec;
fn is_supported(ext: &WebGLExtensions) -> bool;
fn enable(ext: &WebGLExtensions);
fn name() -> &'static str;
}Expand description
Trait implemented by WebGL extensions.
Required Associated Types§
Required Methods§
Sourcefn new(
cx: &mut JSContext,
ctx: &WebGLRenderingContext,
) -> DomRoot<Self::Extension>
fn new( cx: &mut JSContext, ctx: &WebGLRenderingContext, ) -> DomRoot<Self::Extension>
Creates the DOM object of the WebGL extension.
Sourcefn spec() -> WebGLExtensionSpec
fn spec() -> WebGLExtensionSpec
Returns which WebGL spec is this extension written against.
Sourcefn is_supported(ext: &WebGLExtensions) -> bool
fn is_supported(ext: &WebGLExtensions) -> bool
Checks if the extension is supported.
Sourcefn enable(ext: &WebGLExtensions)
fn enable(ext: &WebGLExtensions)
Enable the extension.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.