Crate minwebgl

Source
Expand description

§minwebgl

Minimal set of tools for concise WebGL programming.

§Implemented Features

  • Attributes Uploading
  • Matrices in Attributes Uploading, row-major
  • Instanced Rendering
  • Uniforms Buffer Objects
  • Vertex Array Objects

§Installation and running

To use this library, you’ll need to compile you application to wasm and then use it from javascript.

§Wasm-pack

You can use wasm-pack:

rustup target add wasm32-unknown-unknown  #Install wasm toolchain for rust
cargo install wasm-pack #Install wasm-pack
wasm-pack build --target web #Build your app for plain use on the web

--taget web option will allow you to load your code in a browser directly( in plain HTML ). You can mark your main function with #[wasm_bindgen(start)]`` And then use it in html:

<script type="module">
    import init from "./pkg/you_crate_name.js";
    init();
</script>
§Trunk

Another way is to use trunk - a WASM web application bundler for Rust.

rustup target add wasm32-unknown-unknown  #Install wasm toolchain for rust
cargo install trunk #Install truck
trunk serve --release #Build and run your server in release mode

Any files you want to load in your project have to lie in a ‘static’ directory, relatively to the index.html file.
When using trunk you can specify the following, if your file lie elsewhere

<link data-trunk rel="copy-dir" href="assets/" data-target-path="static"/>

Modules§

_private_phf_reexport_for_macro_if_phf_feature
Rust-PHF is a library to generate efficient lookup tables at compile time using perfect hash functions.
additional_attributes
Documentation for Additional Attributes
attribute
Attribute-related.
browser
Browser-related.
buffer
Buffer-related.
canvas
Operations on canvas.
clone_dyn
console
context
Operations on WebGL context.
d2
data_type
Descriptors of primitive data types.
derive
Derive-related.
diagnostics
Useful information about your objects
dom
Operations on DOM elements.
error
Error-related.
exec_loop
Loop-related.
exposed
Exposed namespace of the module.
file
File processing.
former
future
File processing.
index
Vertex indices.
js_sys
Bindings to JavaScript’s standard, built-in objects, including their methods and properties.
log
Logger-related.
mem
Memory-related entities.
model
obj
orphan
Orphan namespace of the module.
own
Own namespace of the module.
panic
Panic-related.
prelude
Prelude to use essentials: use my_module::prelude::*.
program
Program-related entities and functionality.
shader
Program-related entities and functionality.
texture
Texture related functions
thiserror
githubcrates-iodocs-rs
ubo
Uniform buffer object related.
uniform
Uniform-related.
vao
Vertex array object related.
wasm_bindgen
Runtime support for the wasm-bindgen tool
web_sys
Raw API bindings for Web APIs
webgl
General WebGL things. Unfortunetely web-sys does not allow reuse constants, so them are duplicated in this file.

Macros§

debug
Logs a message at the debug level.
debug_assert_id
Macro asserts that two expressions are identical to each other. Unlike std::assert_eq it is removed from a release build.
debug_assert_identical
Macro asserts that two expressions are identical to each other. Unlike std::assert_eq it is removed from a release build. Alias of debug_assert_id.
debug_assert_ni
Macro asserts that two expressions are not identical to each other. Unlike std::assert_eq it is removed from a release build.
debug_assert_not_identical
Macro asserts that two expressions are not identical to each other. Unlike std::assert_eq it is removed from a release build.
err
Macro to generate an error descriptor.
error
Logs a message at the error level.
from
Variadic constructor.
info
Logs a message at the info level.
log
The standard logging macro.
log_enabled
Determines if a message logged at the specified level in that module will be logged.
mod_interface
Protocol of modularity unifying interface of a module and introducing layers.
return_err
Macro to return an Err( error ) generating error descriptor.
trace
Logs a message at the trace level.
warn
Logs a message at the warn level.

Structs§

BTreeMapDefinition
Represents the formation definition for a hash map-like collection within the former framework.
BTreeMapDefinitionTypes
Holds the generic parameters for the BTreeMapDefinition.
BTreeSetDefinition
Represents the formation definition for a binary tree set-like collection within the former framework.
BTreeSetDefinitionTypes
Holds the generic parameters for the BTreeSetDefinition.
BasicError
baic implementation of generic BasicError
BinaryHeapDefinition
Represents the formation definition for a binary heap-like collection within the former framework.
BinaryHeapDefinitionTypes
Holds the generic parameters for the BinaryHeapDefinition.
BufferDescriptor
Describes the attributes of a WebGL buffer.
CollectionFormer
A builder structure for constructing collections with a fluent and flexible interface.
ForBrowser
FormingEndClosure
A wrapper around a closure to be used as a FormingEnd.
GL
The WebGl2RenderingContext class.
HashMapDefinition
Represents the formation definition for a hash map-like collection within the former framework.
HashMapDefinitionTypes
Holds the generic parameters for the HashMapDefinition.
HashSetDefinition
Represents the formation definition for a hash set-like collection within the former framework.
HashSetDefinitionTypes
Holds the generic parameters for the HashSetDefinition.
JsFuture
A Rust Future backed by a JavaScript Promise.
JsValue
Representation of an object owned by JS.
LinkedListDefinition
Represents the formation definition for a list-like collection within the former framework.
LinkedListDefinitionTypes
Holds the generic parameters for the LinkedListDefinition.
Metadata
Metadata about a log message.
MetadataBuilder
Builder for Metadata.
NoEnd
A placeholder FormingEnd used when no end operation is required or applicable.
ParseLevelError
The type returned by from_str when the string doesn’t match any of the log levels.
ProgramFromSources
Compile shaders and link them into a program, give readable diagnostic information if fail.
Record
The “payload” of a log message.
RecordBuilder
Builder for Record.
ReturnPreformed
A FormingEnd implementation that directly returns the formed collection as the final product of the forming process.
ReturnStorage
A FormingEnd implementation that returns the storage itself as the formed entity, disregarding any contextual data.
SetLoggerError
The type returned by set_logger if set_logger has already been called.
ShaderSource
Information about shader necessary to compile it.
ShadersForProgram
Set of shaders necessary to compile a GPU program.
VecDequeDefinition
Represents the formation definition for a vector deque-like collection within the former framework.
VecDequeDefinitionTypes
Holds the generic parameters for the VecDequeDefinition.
VectorDataType
Represents a data type with a specified size.
VectorDefinition
Represents the formation definition for a vector-like collection within the former framework.
VectorDefinitionTypes
Holds the generic parameters for the VectorDefinition.
WebGl2RenderingContext
The WebGl2RenderingContext class.
WebGlBuffer
The WebGlBuffer class.
WebGlProgram
The WebGlProgram class.
WebGlShader
The WebGlShader class.
WebGlUniformLocation
The WebGlUniformLocation class.
WebGlVertexArrayObject
The WebGlVertexArrayObject class.

Enums§

DataType
Enum representing basic WebGL data types.
Level
An enum representing the available verbosity levels of the logger.
LevelFilter
An enum representing the available verbosity level filters of the logger.
ParseError
The ParseError enum is a collection of all the possible reasons an enum can fail to parse from a string.
WebglError
Represents errors related to dom elements handling.

Constants§

ACTIVE_ATTRIBUTES
The WebGL2RenderingContext.ACTIVE_ATTRIBUTES const.
ACTIVE_TEXTURE
The WebGL2RenderingContext.ACTIVE_TEXTURE const.
ACTIVE_UNIFORMS
The WebGL2RenderingContext.ACTIVE_UNIFORMS const.
ACTIVE_UNIFORM_BLOCKS
The WebGL2RenderingContext.ACTIVE_UNIFORM_BLOCKS const.
ALIASED_LINE_WIDTH_RANGE
The WebGL2RenderingContext.ALIASED_LINE_WIDTH_RANGE const.
ALIASED_POINT_SIZE_RANGE
The WebGL2RenderingContext.ALIASED_POINT_SIZE_RANGE const.
ALPHA
The WebGL2RenderingContext.ALPHA const.
ALPHA_BITS
The WebGL2RenderingContext.ALPHA_BITS const.
ALREADY_SIGNALED
The WebGL2RenderingContext.ALREADY_SIGNALED const.
ALWAYS
The WebGL2RenderingContext.ALWAYS const.
ANY_SAMPLES_PASSED
The WebGL2RenderingContext.ANY_SAMPLES_PASSED const.
ANY_SAMPLES_PASSED_CONSERVATIVE
The WebGL2RenderingContext.ANY_SAMPLES_PASSED_CONSERVATIVE const.
ARRAY_BUFFER
The WebGL2RenderingContext.ARRAY_BUFFER const.
ARRAY_BUFFER_BINDING
The WebGL2RenderingContext.ARRAY_BUFFER_BINDING const.
ATTACHED_SHADERS
The WebGL2RenderingContext.ATTACHED_SHADERS const.
BACK
The WebGL2RenderingContext.BACK const.
BLEND
The WebGL2RenderingContext.BLEND const.
BLEND_COLOR
The WebGL2RenderingContext.BLEND_COLOR const.
BLEND_DST_ALPHA
The WebGL2RenderingContext.BLEND_DST_ALPHA const.
BLEND_DST_RGB
The WebGL2RenderingContext.BLEND_DST_RGB const.
BLEND_EQUATION
The WebGL2RenderingContext.BLEND_EQUATION const.
BLEND_EQUATION_ALPHA
The WebGL2RenderingContext.BLEND_EQUATION_ALPHA const.
BLEND_EQUATION_RGB
The WebGL2RenderingContext.BLEND_EQUATION_RGB const.
BLEND_SRC_ALPHA
The WebGL2RenderingContext.BLEND_SRC_ALPHA const.
BLEND_SRC_RGB
The WebGL2RenderingContext.BLEND_SRC_RGB const.
BLUE_BITS
The WebGL2RenderingContext.BLUE_BITS const.
BOOL
The WebGL2RenderingContext.BOOL const.
BOOL_VEC2
The WebGL2RenderingContext.BOOL_VEC2 const.
BOOL_VEC3
The WebGL2RenderingContext.BOOL_VEC3 const.
BOOL_VEC4
The WebGL2RenderingContext.BOOL_VEC4 const.
BROWSER_DEFAULT_WEBGL
The WebGL2RenderingContext.BROWSER_DEFAULT_WEBGL const.
BUFFER_SIZE
The WebGL2RenderingContext.BUFFER_SIZE const.
BUFFER_USAGE
The WebGL2RenderingContext.BUFFER_USAGE const.
BYTE
The WebGL2RenderingContext.BYTE const.
CCW
The WebGL2RenderingContext.CCW const.
CLAMP_TO_EDGE
The WebGL2RenderingContext.CLAMP_TO_EDGE const.
COLOR
The WebGL2RenderingContext.COLOR const.
COLOR_ATTACHMENT0
The WebGL2RenderingContext.COLOR_ATTACHMENT0 const.
COLOR_ATTACHMENT1
The WebGL2RenderingContext.COLOR_ATTACHMENT1 const.
COLOR_ATTACHMENT2
The WebGL2RenderingContext.COLOR_ATTACHMENT2 const.
COLOR_ATTACHMENT3
The WebGL2RenderingContext.COLOR_ATTACHMENT3 const.
COLOR_ATTACHMENT4
The WebGL2RenderingContext.COLOR_ATTACHMENT4 const.
COLOR_ATTACHMENT5
The WebGL2RenderingContext.COLOR_ATTACHMENT5 const.
COLOR_ATTACHMENT6
The WebGL2RenderingContext.COLOR_ATTACHMENT6 const.
COLOR_ATTACHMENT7
The WebGL2RenderingContext.COLOR_ATTACHMENT7 const.
COLOR_ATTACHMENT8
The WebGL2RenderingContext.COLOR_ATTACHMENT8 const.
COLOR_ATTACHMENT9
The WebGL2RenderingContext.COLOR_ATTACHMENT9 const.
COLOR_ATTACHMENT10
The WebGL2RenderingContext.COLOR_ATTACHMENT10 const.
COLOR_ATTACHMENT11
The WebGL2RenderingContext.COLOR_ATTACHMENT11 const.
COLOR_ATTACHMENT12
The WebGL2RenderingContext.COLOR_ATTACHMENT12 const.
COLOR_ATTACHMENT13
The WebGL2RenderingContext.COLOR_ATTACHMENT13 const.
COLOR_ATTACHMENT14
The WebGL2RenderingContext.COLOR_ATTACHMENT14 const.
COLOR_ATTACHMENT15
The WebGL2RenderingContext.COLOR_ATTACHMENT15 const.
COLOR_BUFFER_BIT
The WebGL2RenderingContext.COLOR_BUFFER_BIT const.
COLOR_CLEAR_VALUE
The WebGL2RenderingContext.COLOR_CLEAR_VALUE const.
COLOR_WRITEMASK
The WebGL2RenderingContext.COLOR_WRITEMASK const.
COMPARE_REF_TO_TEXTURE
The WebGL2RenderingContext.COMPARE_REF_TO_TEXTURE const.
COMPILE_STATUS
The WebGL2RenderingContext.COMPILE_STATUS const.
COMPRESSED_TEXTURE_FORMATS
The WebGL2RenderingContext.COMPRESSED_TEXTURE_FORMATS const.
CONDITION_SATISFIED
The WebGL2RenderingContext.CONDITION_SATISFIED const.
CONSTANT_ALPHA
The WebGL2RenderingContext.CONSTANT_ALPHA const.
CONSTANT_COLOR
The WebGL2RenderingContext.CONSTANT_COLOR const.
CONTEXT_LOST_WEBGL
The WebGL2RenderingContext.CONTEXT_LOST_WEBGL const.
COPY_READ_BUFFER
The WebGL2RenderingContext.COPY_READ_BUFFER const.
COPY_READ_BUFFER_BINDING
The WebGL2RenderingContext.COPY_READ_BUFFER_BINDING const.
COPY_WRITE_BUFFER
The WebGL2RenderingContext.COPY_WRITE_BUFFER const.
COPY_WRITE_BUFFER_BINDING
The WebGL2RenderingContext.COPY_WRITE_BUFFER_BINDING const.
CULL_FACE
The WebGL2RenderingContext.CULL_FACE const.
CULL_FACE_MODE
The WebGL2RenderingContext.CULL_FACE_MODE const.
CURRENT_PROGRAM
The WebGL2RenderingContext.CURRENT_PROGRAM const.
CURRENT_QUERY
The WebGL2RenderingContext.CURRENT_QUERY const.
CURRENT_VERTEX_ATTRIB
The WebGL2RenderingContext.CURRENT_VERTEX_ATTRIB const.
CW
The WebGL2RenderingContext.CW const.
DECR
The WebGL2RenderingContext.DECR const.
DECR_WRAP
The WebGL2RenderingContext.DECR_WRAP const.
DELETE_STATUS
The WebGL2RenderingContext.DELETE_STATUS const.
DEPTH
The WebGL2RenderingContext.DEPTH const.
DEPTH24_STENCIL8
The WebGL2RenderingContext.DEPTH24_STENCIL8 const.
DEPTH32F_STENCIL8
The WebGL2RenderingContext.DEPTH32F_STENCIL8 const.
DEPTH_ATTACHMENT
The WebGL2RenderingContext.DEPTH_ATTACHMENT const.
DEPTH_BITS
The WebGL2RenderingContext.DEPTH_BITS const.
DEPTH_BUFFER_BIT
The WebGL2RenderingContext.DEPTH_BUFFER_BIT const.
DEPTH_CLEAR_VALUE
The WebGL2RenderingContext.DEPTH_CLEAR_VALUE const.
DEPTH_COMPONENT
The WebGL2RenderingContext.DEPTH_COMPONENT const.
DEPTH_COMPONENT16
The WebGL2RenderingContext.DEPTH_COMPONENT16 const.
DEPTH_COMPONENT24
The WebGL2RenderingContext.DEPTH_COMPONENT24 const.
DEPTH_COMPONENT32F
The WebGL2RenderingContext.DEPTH_COMPONENT32F const.
DEPTH_FUNC
The WebGL2RenderingContext.DEPTH_FUNC const.
DEPTH_RANGE
The WebGL2RenderingContext.DEPTH_RANGE const.
DEPTH_STENCIL
The WebGL2RenderingContext.DEPTH_STENCIL const.
DEPTH_STENCIL_ATTACHMENT
The WebGL2RenderingContext.DEPTH_STENCIL_ATTACHMENT const.
DEPTH_TEST
The WebGL2RenderingContext.DEPTH_TEST const.
DEPTH_WRITEMASK
The WebGL2RenderingContext.DEPTH_WRITEMASK const.
DITHER
The WebGL2RenderingContext.DITHER const.
DONT_CARE
The WebGL2RenderingContext.DONT_CARE const.
DRAW_BUFFER0
The WebGL2RenderingContext.DRAW_BUFFER0 const.
DRAW_BUFFER1
The WebGL2RenderingContext.DRAW_BUFFER1 const.
DRAW_BUFFER2
The WebGL2RenderingContext.DRAW_BUFFER2 const.
DRAW_BUFFER3
The WebGL2RenderingContext.DRAW_BUFFER3 const.
DRAW_BUFFER4
The WebGL2RenderingContext.DRAW_BUFFER4 const.
DRAW_BUFFER5
The WebGL2RenderingContext.DRAW_BUFFER5 const.
DRAW_BUFFER6
The WebGL2RenderingContext.DRAW_BUFFER6 const.
DRAW_BUFFER7
The WebGL2RenderingContext.DRAW_BUFFER7 const.
DRAW_BUFFER8
The WebGL2RenderingContext.DRAW_BUFFER8 const.
DRAW_BUFFER9
The WebGL2RenderingContext.DRAW_BUFFER9 const.
DRAW_BUFFER10
The WebGL2RenderingContext.DRAW_BUFFER10 const.
DRAW_BUFFER11
The WebGL2RenderingContext.DRAW_BUFFER11 const.
DRAW_BUFFER12
The WebGL2RenderingContext.DRAW_BUFFER12 const.
DRAW_BUFFER13
The WebGL2RenderingContext.DRAW_BUFFER13 const.
DRAW_BUFFER14
The WebGL2RenderingContext.DRAW_BUFFER14 const.
DRAW_BUFFER15
The WebGL2RenderingContext.DRAW_BUFFER15 const.
DRAW_FRAMEBUFFER
The WebGL2RenderingContext.DRAW_FRAMEBUFFER const.
DRAW_FRAMEBUFFER_BINDING
The WebGL2RenderingContext.DRAW_FRAMEBUFFER_BINDING const.
DST_ALPHA
The WebGL2RenderingContext.DST_ALPHA const.
DST_COLOR
The WebGL2RenderingContext.DST_COLOR const.
DYNAMIC_COPY
The WebGL2RenderingContext.DYNAMIC_COPY const.
DYNAMIC_DRAW
The WebGL2RenderingContext.DYNAMIC_DRAW const.
DYNAMIC_READ
The WebGL2RenderingContext.DYNAMIC_READ const.
ELEMENT_ARRAY_BUFFER
The WebGL2RenderingContext.ELEMENT_ARRAY_BUFFER const.
ELEMENT_ARRAY_BUFFER_BINDING
The WebGL2RenderingContext.ELEMENT_ARRAY_BUFFER_BINDING const.
EQUAL
The WebGL2RenderingContext.EQUAL const.
FASTEST
The WebGL2RenderingContext.FASTEST const.
FLOAT
The WebGL2RenderingContext.FLOAT const.
FLOAT_32_UNSIGNED_INT_24_8_REV
The WebGL2RenderingContext.FLOAT_32_UNSIGNED_INT_24_8_REV const.
FLOAT_MAT2
The WebGL2RenderingContext.FLOAT_MAT2 const.
FLOAT_MAT3
The WebGL2RenderingContext.FLOAT_MAT3 const.
FLOAT_MAT4
The WebGL2RenderingContext.FLOAT_MAT4 const.
FLOAT_MAT2X3
The WebGL2RenderingContext.FLOAT_MAT2x3 const.
FLOAT_MAT2X4
The WebGL2RenderingContext.FLOAT_MAT2x4 const.
FLOAT_MAT3X2
The WebGL2RenderingContext.FLOAT_MAT3x2 const.
FLOAT_MAT3X4
The WebGL2RenderingContext.FLOAT_MAT3x4 const.
FLOAT_MAT4X2
The WebGL2RenderingContext.FLOAT_MAT4x2 const.
FLOAT_MAT4X3
The WebGL2RenderingContext.FLOAT_MAT4x3 const.
FLOAT_VEC2
The WebGL2RenderingContext.FLOAT_VEC2 const.
FLOAT_VEC3
The WebGL2RenderingContext.FLOAT_VEC3 const.
FLOAT_VEC4
The WebGL2RenderingContext.FLOAT_VEC4 const.
FRAGMENT_SHADER
The WebGL2RenderingContext.FRAGMENT_SHADER const.
FRAGMENT_SHADER_DERIVATIVE_HINT
The WebGL2RenderingContext.FRAGMENT_SHADER_DERIVATIVE_HINT const.
FRAMEBUFFER
The WebGL2RenderingContext.FRAMEBUFFER const.
FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE
The WebGL2RenderingContext.FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE const.
FRAMEBUFFER_ATTACHMENT_BLUE_SIZE
The WebGL2RenderingContext.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE const.
FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING
The WebGL2RenderingContext.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING const.
FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE
The WebGL2RenderingContext.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE const.
FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE
The WebGL2RenderingContext.FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE const.
FRAMEBUFFER_ATTACHMENT_GREEN_SIZE
The WebGL2RenderingContext.FRAMEBUFFER_ATTACHMENT_GREEN_SIZE const.
FRAMEBUFFER_ATTACHMENT_OBJECT_NAME
The WebGL2RenderingContext.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME const.
FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE
The WebGL2RenderingContext.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE const.
FRAMEBUFFER_ATTACHMENT_RED_SIZE
The WebGL2RenderingContext.FRAMEBUFFER_ATTACHMENT_RED_SIZE const.
FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE
The WebGL2RenderingContext.FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE const.
FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE
The WebGL2RenderingContext.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE const.
FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER
The WebGL2RenderingContext.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER const.
FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL
The WebGL2RenderingContext.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL const.
FRAMEBUFFER_BINDING
The WebGL2RenderingContext.FRAMEBUFFER_BINDING const.
FRAMEBUFFER_COMPLETE
The WebGL2RenderingContext.FRAMEBUFFER_COMPLETE const.
FRAMEBUFFER_DEFAULT
The WebGL2RenderingContext.FRAMEBUFFER_DEFAULT const.
FRAMEBUFFER_INCOMPLETE_ATTACHMENT
The WebGL2RenderingContext.FRAMEBUFFER_INCOMPLETE_ATTACHMENT const.
FRAMEBUFFER_INCOMPLETE_DIMENSIONS
The WebGL2RenderingContext.FRAMEBUFFER_INCOMPLETE_DIMENSIONS const.
FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
The WebGL2RenderingContext.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT const.
FRAMEBUFFER_INCOMPLETE_MULTISAMPLE
The WebGL2RenderingContext.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE const.
FRAMEBUFFER_UNSUPPORTED
The WebGL2RenderingContext.FRAMEBUFFER_UNSUPPORTED const.
FRONT
The WebGL2RenderingContext.FRONT const.
FRONT_AND_BACK
The WebGL2RenderingContext.FRONT_AND_BACK const.
FRONT_FACE
The WebGL2RenderingContext.FRONT_FACE const.
FUNC_ADD
The WebGL2RenderingContext.FUNC_ADD const.
FUNC_REVERSE_SUBTRACT
The WebGL2RenderingContext.FUNC_REVERSE_SUBTRACT const.
FUNC_SUBTRACT
The WebGL2RenderingContext.FUNC_SUBTRACT const.
GENERATE_MIPMAP_HINT
The WebGL2RenderingContext.GENERATE_MIPMAP_HINT const.
GEQUAL
The WebGL2RenderingContext.GEQUAL const.
GREATER
The WebGL2RenderingContext.GREATER const.
GREEN_BITS
The WebGL2RenderingContext.GREEN_BITS const.
HALF_FLOAT
The WebGL2RenderingContext.HALF_FLOAT const.
HIGH_FLOAT
The WebGL2RenderingContext.HIGH_FLOAT const.
HIGH_INT
The WebGL2RenderingContext.HIGH_INT const.
IMPLEMENTATION_COLOR_READ_FORMAT
The WebGL2RenderingContext.IMPLEMENTATION_COLOR_READ_FORMAT const.
IMPLEMENTATION_COLOR_READ_TYPE
The WebGL2RenderingContext.IMPLEMENTATION_COLOR_READ_TYPE const.
INCR
The WebGL2RenderingContext.INCR const.
INCR_WRAP
The WebGL2RenderingContext.INCR_WRAP const.
INT
The WebGL2RenderingContext.INT const.
INTERLEAVED_ATTRIBS
The WebGL2RenderingContext.INTERLEAVED_ATTRIBS const.
INT_2_10_10_10_REV
The WebGL2RenderingContext.INT_2_10_10_10_REV const.
INT_SAMPLER_2D
The WebGL2RenderingContext.INT_SAMPLER_2D const.
INT_SAMPLER_2D_ARRAY
The WebGL2RenderingContext.INT_SAMPLER_2D_ARRAY const.
INT_SAMPLER_3D
The WebGL2RenderingContext.INT_SAMPLER_3D const.
INT_SAMPLER_CUBE
The WebGL2RenderingContext.INT_SAMPLER_CUBE const.
INT_VEC2
The WebGL2RenderingContext.INT_VEC2 const.
INT_VEC3
The WebGL2RenderingContext.INT_VEC3 const.
INT_VEC4
The WebGL2RenderingContext.INT_VEC4 const.
INVALID_ENUM
The WebGL2RenderingContext.INVALID_ENUM const.
INVALID_FRAMEBUFFER_OPERATION
The WebGL2RenderingContext.INVALID_FRAMEBUFFER_OPERATION const.
INVALID_INDEX
The WebGL2RenderingContext.INVALID_INDEX const.
INVALID_OPERATION
The WebGL2RenderingContext.INVALID_OPERATION const.
INVALID_VALUE
The WebGL2RenderingContext.INVALID_VALUE const.
INVERT
The WebGL2RenderingContext.INVERT const.
KEEP
The WebGL2RenderingContext.KEEP const.
LEQUAL
The WebGL2RenderingContext.LEQUAL const.
LESS
The WebGL2RenderingContext.LESS const.
LINEAR
The WebGL2RenderingContext.LINEAR const.
LINEAR_MIPMAP_LINEAR
The WebGL2RenderingContext.LINEAR_MIPMAP_LINEAR const.
LINEAR_MIPMAP_NEAREST
The WebGL2RenderingContext.LINEAR_MIPMAP_NEAREST const.
LINES
The WebGL2RenderingContext.LINES const.
LINE_LOOP
The WebGL2RenderingContext.LINE_LOOP const.
LINE_STRIP
The WebGL2RenderingContext.LINE_STRIP const.
LINE_WIDTH
The WebGL2RenderingContext.LINE_WIDTH const.
LINK_STATUS
The WebGL2RenderingContext.LINK_STATUS const.
LOW_FLOAT
The WebGL2RenderingContext.LOW_FLOAT const.
LOW_INT
The WebGL2RenderingContext.LOW_INT const.
LUMINANCE
The WebGL2RenderingContext.LUMINANCE const.
LUMINANCE_ALPHA
The WebGL2RenderingContext.LUMINANCE_ALPHA const.
MAX
The WebGL2RenderingContext.MAX const.
MAX_3D_TEXTURE_SIZE
The WebGL2RenderingContext.MAX_3D_TEXTURE_SIZE const.
MAX_ARRAY_TEXTURE_LAYERS
The WebGL2RenderingContext.MAX_ARRAY_TEXTURE_LAYERS const.
MAX_CLIENT_WAIT_TIMEOUT_WEBGL
The WebGL2RenderingContext.MAX_CLIENT_WAIT_TIMEOUT_WEBGL const.
MAX_COLOR_ATTACHMENTS
The WebGL2RenderingContext.MAX_COLOR_ATTACHMENTS const.
MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS
The WebGL2RenderingContext.MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS const.
MAX_COMBINED_TEXTURE_IMAGE_UNITS
The WebGL2RenderingContext.MAX_COMBINED_TEXTURE_IMAGE_UNITS const.
MAX_COMBINED_UNIFORM_BLOCKS
The WebGL2RenderingContext.MAX_COMBINED_UNIFORM_BLOCKS const.
MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS
The WebGL2RenderingContext.MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS const.
MAX_CUBE_MAP_TEXTURE_SIZE
The WebGL2RenderingContext.MAX_CUBE_MAP_TEXTURE_SIZE const.
MAX_DRAW_BUFFERS
The WebGL2RenderingContext.MAX_DRAW_BUFFERS const.
MAX_ELEMENTS_INDICES
The WebGL2RenderingContext.MAX_ELEMENTS_INDICES const.
MAX_ELEMENTS_VERTICES
The WebGL2RenderingContext.MAX_ELEMENTS_VERTICES const.
MAX_ELEMENT_INDEX
The WebGL2RenderingContext.MAX_ELEMENT_INDEX const.
MAX_FRAGMENT_INPUT_COMPONENTS
The WebGL2RenderingContext.MAX_FRAGMENT_INPUT_COMPONENTS const.
MAX_FRAGMENT_UNIFORM_BLOCKS
The WebGL2RenderingContext.MAX_FRAGMENT_UNIFORM_BLOCKS const.
MAX_FRAGMENT_UNIFORM_COMPONENTS
The WebGL2RenderingContext.MAX_FRAGMENT_UNIFORM_COMPONENTS const.
MAX_FRAGMENT_UNIFORM_VECTORS
The WebGL2RenderingContext.MAX_FRAGMENT_UNIFORM_VECTORS const.
MAX_PROGRAM_TEXEL_OFFSET
The WebGL2RenderingContext.MAX_PROGRAM_TEXEL_OFFSET const.
MAX_RENDERBUFFER_SIZE
The WebGL2RenderingContext.MAX_RENDERBUFFER_SIZE const.
MAX_SAMPLES
The WebGL2RenderingContext.MAX_SAMPLES const.
MAX_SERVER_WAIT_TIMEOUT
The WebGL2RenderingContext.MAX_SERVER_WAIT_TIMEOUT const.
MAX_TEXTURE_IMAGE_UNITS
The WebGL2RenderingContext.MAX_TEXTURE_IMAGE_UNITS const.
MAX_TEXTURE_LOD_BIAS
The WebGL2RenderingContext.MAX_TEXTURE_LOD_BIAS const.
MAX_TEXTURE_SIZE
The WebGL2RenderingContext.MAX_TEXTURE_SIZE const.
MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS
The WebGL2RenderingContext.MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS const.
MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS
The WebGL2RenderingContext.MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS const.
MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS
The WebGL2RenderingContext.MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS const.
MAX_UNIFORM_BLOCK_SIZE
The WebGL2RenderingContext.MAX_UNIFORM_BLOCK_SIZE const.
MAX_UNIFORM_BUFFER_BINDINGS
The WebGL2RenderingContext.MAX_UNIFORM_BUFFER_BINDINGS const.
MAX_VARYING_COMPONENTS
The WebGL2RenderingContext.MAX_VARYING_COMPONENTS const.
MAX_VARYING_VECTORS
The WebGL2RenderingContext.MAX_VARYING_VECTORS const.
MAX_VERTEX_ATTRIBS
The WebGL2RenderingContext.MAX_VERTEX_ATTRIBS const.
MAX_VERTEX_OUTPUT_COMPONENTS
The WebGL2RenderingContext.MAX_VERTEX_OUTPUT_COMPONENTS const.
MAX_VERTEX_TEXTURE_IMAGE_UNITS
The WebGL2RenderingContext.MAX_VERTEX_TEXTURE_IMAGE_UNITS const.
MAX_VERTEX_UNIFORM_BLOCKS
The WebGL2RenderingContext.MAX_VERTEX_UNIFORM_BLOCKS const.
MAX_VERTEX_UNIFORM_COMPONENTS
The WebGL2RenderingContext.MAX_VERTEX_UNIFORM_COMPONENTS const.
MAX_VERTEX_UNIFORM_VECTORS
The WebGL2RenderingContext.MAX_VERTEX_UNIFORM_VECTORS const.
MAX_VIEWPORT_DIMS
The WebGL2RenderingContext.MAX_VIEWPORT_DIMS const.
MEDIUM_FLOAT
The WebGL2RenderingContext.MEDIUM_FLOAT const.
MEDIUM_INT
The WebGL2RenderingContext.MEDIUM_INT const.
MIN
The WebGL2RenderingContext.MIN const.
MIN_PROGRAM_TEXEL_OFFSET
The WebGL2RenderingContext.MIN_PROGRAM_TEXEL_OFFSET const.
MIRRORED_REPEAT
The WebGL2RenderingContext.MIRRORED_REPEAT const.
NEAREST
The WebGL2RenderingContext.NEAREST const.
NEAREST_MIPMAP_LINEAR
The WebGL2RenderingContext.NEAREST_MIPMAP_LINEAR const.
NEAREST_MIPMAP_NEAREST
The WebGL2RenderingContext.NEAREST_MIPMAP_NEAREST const.
NEVER
The WebGL2RenderingContext.NEVER const.
NICEST
The WebGL2RenderingContext.NICEST const.
NONE
The WebGL2RenderingContext.NONE const.
NOTEQUAL
The WebGL2RenderingContext.NOTEQUAL const.
NO_ERROR
The WebGL2RenderingContext.NO_ERROR const.
OBJECT_TYPE
The WebGL2RenderingContext.OBJECT_TYPE const.
ONE
The WebGL2RenderingContext.ONE const.
ONE_MINUS_CONSTANT_ALPHA
The WebGL2RenderingContext.ONE_MINUS_CONSTANT_ALPHA const.
ONE_MINUS_CONSTANT_COLOR
The WebGL2RenderingContext.ONE_MINUS_CONSTANT_COLOR const.
ONE_MINUS_DST_ALPHA
The WebGL2RenderingContext.ONE_MINUS_DST_ALPHA const.
ONE_MINUS_DST_COLOR
The WebGL2RenderingContext.ONE_MINUS_DST_COLOR const.
ONE_MINUS_SRC_ALPHA
The WebGL2RenderingContext.ONE_MINUS_SRC_ALPHA const.
ONE_MINUS_SRC_COLOR
The WebGL2RenderingContext.ONE_MINUS_SRC_COLOR const.
OUT_OF_MEMORY
The WebGL2RenderingContext.OUT_OF_MEMORY const.
PACK_ALIGNMENT
The WebGL2RenderingContext.PACK_ALIGNMENT const.
PACK_ROW_LENGTH
The WebGL2RenderingContext.PACK_ROW_LENGTH const.
PACK_SKIP_PIXELS
The WebGL2RenderingContext.PACK_SKIP_PIXELS const.
PACK_SKIP_ROWS
The WebGL2RenderingContext.PACK_SKIP_ROWS const.
PIXEL_PACK_BUFFER
The WebGL2RenderingContext.PIXEL_PACK_BUFFER const.
PIXEL_PACK_BUFFER_BINDING
The WebGL2RenderingContext.PIXEL_PACK_BUFFER_BINDING const.
PIXEL_UNPACK_BUFFER
The WebGL2RenderingContext.PIXEL_UNPACK_BUFFER const.
PIXEL_UNPACK_BUFFER_BINDING
The WebGL2RenderingContext.PIXEL_UNPACK_BUFFER_BINDING const.
POINTS
The WebGL2RenderingContext.POINTS const.
POLYGON_OFFSET_FACTOR
The WebGL2RenderingContext.POLYGON_OFFSET_FACTOR const.
POLYGON_OFFSET_FILL
The WebGL2RenderingContext.POLYGON_OFFSET_FILL const.
POLYGON_OFFSET_UNITS
The WebGL2RenderingContext.POLYGON_OFFSET_UNITS const.
QUERY_RESULT
The WebGL2RenderingContext.QUERY_RESULT const.
QUERY_RESULT_AVAILABLE
The WebGL2RenderingContext.QUERY_RESULT_AVAILABLE const.
R8
The WebGL2RenderingContext.R8 const.
R8I
The WebGL2RenderingContext.R8I const.
R8UI
The WebGL2RenderingContext.R8UI const.
R8_SNORM
The WebGL2RenderingContext.R8_SNORM const.
R11F_G11F_B10F
The WebGL2RenderingContext.R11F_G11F_B10F const.
R16F
The WebGL2RenderingContext.R16F const.
R16I
The WebGL2RenderingContext.R16I const.
R16UI
The WebGL2RenderingContext.R16UI const.
R32F
The WebGL2RenderingContext.R32F const.
R32I
The WebGL2RenderingContext.R32I const.
R32UI
The WebGL2RenderingContext.R32UI const.
RASTERIZER_DISCARD
The WebGL2RenderingContext.RASTERIZER_DISCARD const.
READ_BUFFER
The WebGL2RenderingContext.READ_BUFFER const.
READ_FRAMEBUFFER
The WebGL2RenderingContext.READ_FRAMEBUFFER const.
READ_FRAMEBUFFER_BINDING
The WebGL2RenderingContext.READ_FRAMEBUFFER_BINDING const.
RED
The WebGL2RenderingContext.RED const.
RED_BITS
The WebGL2RenderingContext.RED_BITS const.
RED_INTEGER
The WebGL2RenderingContext.RED_INTEGER const.
RENDERBUFFER
The WebGL2RenderingContext.RENDERBUFFER const.
RENDERBUFFER_ALPHA_SIZE
The WebGL2RenderingContext.RENDERBUFFER_ALPHA_SIZE const.
RENDERBUFFER_BINDING
The WebGL2RenderingContext.RENDERBUFFER_BINDING const.
RENDERBUFFER_BLUE_SIZE
The WebGL2RenderingContext.RENDERBUFFER_BLUE_SIZE const.
RENDERBUFFER_DEPTH_SIZE
The WebGL2RenderingContext.RENDERBUFFER_DEPTH_SIZE const.
RENDERBUFFER_GREEN_SIZE
The WebGL2RenderingContext.RENDERBUFFER_GREEN_SIZE const.
RENDERBUFFER_HEIGHT
The WebGL2RenderingContext.RENDERBUFFER_HEIGHT const.
RENDERBUFFER_INTERNAL_FORMAT
The WebGL2RenderingContext.RENDERBUFFER_INTERNAL_FORMAT const.
RENDERBUFFER_RED_SIZE
The WebGL2RenderingContext.RENDERBUFFER_RED_SIZE const.
RENDERBUFFER_SAMPLES
The WebGL2RenderingContext.RENDERBUFFER_SAMPLES const.
RENDERBUFFER_STENCIL_SIZE
The WebGL2RenderingContext.RENDERBUFFER_STENCIL_SIZE const.
RENDERBUFFER_WIDTH
The WebGL2RenderingContext.RENDERBUFFER_WIDTH const.
RENDERER
The WebGL2RenderingContext.RENDERER const.
REPEAT
The WebGL2RenderingContext.REPEAT const.
REPLACE
The WebGL2RenderingContext.REPLACE const.
RG
The WebGL2RenderingContext.RG const.
RG8
The WebGL2RenderingContext.RG8 const.
RG8I
The WebGL2RenderingContext.RG8I const.
RG8UI
The WebGL2RenderingContext.RG8UI const.
RG8_SNORM
The WebGL2RenderingContext.RG8_SNORM const.
RG16F
The WebGL2RenderingContext.RG16F const.
RG16I
The WebGL2RenderingContext.RG16I const.
RG16UI
The WebGL2RenderingContext.RG16UI const.
RG32F
The WebGL2RenderingContext.RG32F const.
RG32I
The WebGL2RenderingContext.RG32I const.
RG32UI
The WebGL2RenderingContext.RG32UI const.
RGB
The WebGL2RenderingContext.RGB const.
RGB8
The WebGL2RenderingContext.RGB8 const.
RGB5_A1
The WebGL2RenderingContext.RGB5_A1 const.
RGB8I
The WebGL2RenderingContext.RGB8I const.
RGB8UI
The WebGL2RenderingContext.RGB8UI const.
RGB8_SNORM
The WebGL2RenderingContext.RGB8_SNORM const.
RGB9_E5
The WebGL2RenderingContext.RGB9_E5 const.
RGB10_A2
The WebGL2RenderingContext.RGB10_A2 const.
RGB10_A2UI
The WebGL2RenderingContext.RGB10_A2UI const.
RGB16F
The WebGL2RenderingContext.RGB16F const.
RGB16I
The WebGL2RenderingContext.RGB16I const.
RGB16UI
The WebGL2RenderingContext.RGB16UI const.
RGB32F
The WebGL2RenderingContext.RGB32F const.
RGB32I
The WebGL2RenderingContext.RGB32I const.
RGB32UI
The WebGL2RenderingContext.RGB32UI const.
RGB565
The WebGL2RenderingContext.RGB565 const.
RGBA
The WebGL2RenderingContext.RGBA const.
RGBA4
The WebGL2RenderingContext.RGBA4 const.
RGBA8
The WebGL2RenderingContext.RGBA8 const.
RGBA8I
The WebGL2RenderingContext.RGBA8I const.
RGBA8UI
The WebGL2RenderingContext.RGBA8UI const.
RGBA8_SNORM
The WebGL2RenderingContext.RGBA8_SNORM const.
RGBA16F
The WebGL2RenderingContext.RGBA16F const.
RGBA16I
The WebGL2RenderingContext.RGBA16I const.
RGBA16UI
The WebGL2RenderingContext.RGBA16UI const.
RGBA32F
The WebGL2RenderingContext.RGBA32F const.
RGBA32I
The WebGL2RenderingContext.RGBA32I const.
RGBA32UI
The WebGL2RenderingContext.RGBA32UI const.
RGBA_INTEGER
The WebGL2RenderingContext.RGBA_INTEGER const.
RGB_INTEGER
The WebGL2RenderingContext.RGB_INTEGER const.
RG_INTEGER
The WebGL2RenderingContext.RG_INTEGER const.
SAMPLER_2D
The WebGL2RenderingContext.SAMPLER_2D const.
SAMPLER_2D_ARRAY
The WebGL2RenderingContext.SAMPLER_2D_ARRAY const.
SAMPLER_2D_ARRAY_SHADOW
The WebGL2RenderingContext.SAMPLER_2D_ARRAY_SHADOW const.
SAMPLER_2D_SHADOW
The WebGL2RenderingContext.SAMPLER_2D_SHADOW const.
SAMPLER_3D
The WebGL2RenderingContext.SAMPLER_3D const.
SAMPLER_BINDING
The WebGL2RenderingContext.SAMPLER_BINDING const.
SAMPLER_CUBE
The WebGL2RenderingContext.SAMPLER_CUBE const.
SAMPLER_CUBE_SHADOW
The WebGL2RenderingContext.SAMPLER_CUBE_SHADOW const.
SAMPLES
The WebGL2RenderingContext.SAMPLES const.
SAMPLE_ALPHA_TO_COVERAGE
The WebGL2RenderingContext.SAMPLE_ALPHA_TO_COVERAGE const.
SAMPLE_BUFFERS
The WebGL2RenderingContext.SAMPLE_BUFFERS const.
SAMPLE_COVERAGE
The WebGL2RenderingContext.SAMPLE_COVERAGE const.
SAMPLE_COVERAGE_INVERT
The WebGL2RenderingContext.SAMPLE_COVERAGE_INVERT const.
SAMPLE_COVERAGE_VALUE
The WebGL2RenderingContext.SAMPLE_COVERAGE_VALUE const.
SCISSOR_BOX
The WebGL2RenderingContext.SCISSOR_BOX const.
SCISSOR_TEST
The WebGL2RenderingContext.SCISSOR_TEST const.
SEPARATE_ATTRIBS
The WebGL2RenderingContext.SEPARATE_ATTRIBS const.
SHADER_TYPE
The WebGL2RenderingContext.SHADER_TYPE const.
SHADING_LANGUAGE_VERSION
The WebGL2RenderingContext.SHADING_LANGUAGE_VERSION const.
SHORT
The WebGL2RenderingContext.SHORT const.
SIGNALED
The WebGL2RenderingContext.SIGNALED const.
SIGNED_NORMALIZED
The WebGL2RenderingContext.SIGNED_NORMALIZED const.
SRC_ALPHA
The WebGL2RenderingContext.SRC_ALPHA const.
SRC_ALPHA_SATURATE
The WebGL2RenderingContext.SRC_ALPHA_SATURATE const.
SRC_COLOR
The WebGL2RenderingContext.SRC_COLOR const.
SRGB
The WebGL2RenderingContext.SRGB const.
SRGB8
The WebGL2RenderingContext.SRGB8 const.
SRGB8_ALPHA8
The WebGL2RenderingContext.SRGB8_ALPHA8 const.
STATIC_COPY
The WebGL2RenderingContext.STATIC_COPY const.
STATIC_DRAW
The WebGL2RenderingContext.STATIC_DRAW const.
STATIC_MAX_LEVEL
The statically resolved maximum log level.
STATIC_READ
The WebGL2RenderingContext.STATIC_READ const.
STENCIL
The WebGL2RenderingContext.STENCIL const.
STENCIL_ATTACHMENT
The WebGL2RenderingContext.STENCIL_ATTACHMENT const.
STENCIL_BACK_FAIL
The WebGL2RenderingContext.STENCIL_BACK_FAIL const.
STENCIL_BACK_FUNC
The WebGL2RenderingContext.STENCIL_BACK_FUNC const.
STENCIL_BACK_PASS_DEPTH_FAIL
The WebGL2RenderingContext.STENCIL_BACK_PASS_DEPTH_FAIL const.
STENCIL_BACK_PASS_DEPTH_PASS
The WebGL2RenderingContext.STENCIL_BACK_PASS_DEPTH_PASS const.
STENCIL_BACK_REF
The WebGL2RenderingContext.STENCIL_BACK_REF const.
STENCIL_BACK_VALUE_MASK
The WebGL2RenderingContext.STENCIL_BACK_VALUE_MASK const.
STENCIL_BACK_WRITEMASK
The WebGL2RenderingContext.STENCIL_BACK_WRITEMASK const.
STENCIL_BITS
The WebGL2RenderingContext.STENCIL_BITS const.
STENCIL_BUFFER_BIT
The WebGL2RenderingContext.STENCIL_BUFFER_BIT const.
STENCIL_CLEAR_VALUE
The WebGL2RenderingContext.STENCIL_CLEAR_VALUE const.
STENCIL_FAIL
The WebGL2RenderingContext.STENCIL_FAIL const.
STENCIL_FUNC
The WebGL2RenderingContext.STENCIL_FUNC const.
STENCIL_INDEX8
The WebGL2RenderingContext.STENCIL_INDEX8 const.
STENCIL_PASS_DEPTH_FAIL
The WebGL2RenderingContext.STENCIL_PASS_DEPTH_FAIL const.
STENCIL_PASS_DEPTH_PASS
The WebGL2RenderingContext.STENCIL_PASS_DEPTH_PASS const.
STENCIL_REF
The WebGL2RenderingContext.STENCIL_REF const.
STENCIL_TEST
The WebGL2RenderingContext.STENCIL_TEST const.
STENCIL_VALUE_MASK
The WebGL2RenderingContext.STENCIL_VALUE_MASK const.
STENCIL_WRITEMASK
The WebGL2RenderingContext.STENCIL_WRITEMASK const.
STREAM_COPY
The WebGL2RenderingContext.STREAM_COPY const.
STREAM_DRAW
The WebGL2RenderingContext.STREAM_DRAW const.
STREAM_READ
The WebGL2RenderingContext.STREAM_READ const.
SUBPIXEL_BITS
The WebGL2RenderingContext.SUBPIXEL_BITS const.
SYNC_CONDITION
The WebGL2RenderingContext.SYNC_CONDITION const.
SYNC_FENCE
The WebGL2RenderingContext.SYNC_FENCE const.
SYNC_FLAGS
The WebGL2RenderingContext.SYNC_FLAGS const.
SYNC_FLUSH_COMMANDS_BIT
The WebGL2RenderingContext.SYNC_FLUSH_COMMANDS_BIT const.
SYNC_GPU_COMMANDS_COMPLETE
The WebGL2RenderingContext.SYNC_GPU_COMMANDS_COMPLETE const.
SYNC_STATUS
The WebGL2RenderingContext.SYNC_STATUS const.
TEXTURE
The WebGL2RenderingContext.TEXTURE const.
TEXTURE0
The WebGL2RenderingContext.TEXTURE0 const.
TEXTURE1
The WebGL2RenderingContext.TEXTURE1 const.
TEXTURE2
The WebGL2RenderingContext.TEXTURE2 const.
TEXTURE3
The WebGL2RenderingContext.TEXTURE3 const.
TEXTURE4
The WebGL2RenderingContext.TEXTURE4 const.
TEXTURE5
The WebGL2RenderingContext.TEXTURE5 const.
TEXTURE6
The WebGL2RenderingContext.TEXTURE6 const.
TEXTURE7
The WebGL2RenderingContext.TEXTURE7 const.
TEXTURE8
The WebGL2RenderingContext.TEXTURE8 const.
TEXTURE9
The WebGL2RenderingContext.TEXTURE9 const.
TEXTURE10
The WebGL2RenderingContext.TEXTURE10 const.
TEXTURE11
The WebGL2RenderingContext.TEXTURE11 const.
TEXTURE12
The WebGL2RenderingContext.TEXTURE12 const.
TEXTURE13
The WebGL2RenderingContext.TEXTURE13 const.
TEXTURE14
The WebGL2RenderingContext.TEXTURE14 const.
TEXTURE15
The WebGL2RenderingContext.TEXTURE15 const.
TEXTURE16
The WebGL2RenderingContext.TEXTURE16 const.
TEXTURE17
The WebGL2RenderingContext.TEXTURE17 const.
TEXTURE18
The WebGL2RenderingContext.TEXTURE18 const.
TEXTURE19
The WebGL2RenderingContext.TEXTURE19 const.
TEXTURE20
The WebGL2RenderingContext.TEXTURE20 const.
TEXTURE21
The WebGL2RenderingContext.TEXTURE21 const.
TEXTURE22
The WebGL2RenderingContext.TEXTURE22 const.
TEXTURE23
The WebGL2RenderingContext.TEXTURE23 const.
TEXTURE24
The WebGL2RenderingContext.TEXTURE24 const.
TEXTURE25
The WebGL2RenderingContext.TEXTURE25 const.
TEXTURE26
The WebGL2RenderingContext.TEXTURE26 const.
TEXTURE27
The WebGL2RenderingContext.TEXTURE27 const.
TEXTURE28
The WebGL2RenderingContext.TEXTURE28 const.
TEXTURE29
The WebGL2RenderingContext.TEXTURE29 const.
TEXTURE30
The WebGL2RenderingContext.TEXTURE30 const.
TEXTURE31
The WebGL2RenderingContext.TEXTURE31 const.
TEXTURE_2D
The WebGL2RenderingContext.TEXTURE_2D const.
TEXTURE_2D_ARRAY
The WebGL2RenderingContext.TEXTURE_2D_ARRAY const.
TEXTURE_3D
The WebGL2RenderingContext.TEXTURE_3D const.
TEXTURE_BASE_LEVEL
The WebGL2RenderingContext.TEXTURE_BASE_LEVEL const.
TEXTURE_BINDING_2D
The WebGL2RenderingContext.TEXTURE_BINDING_2D const.
TEXTURE_BINDING_2D_ARRAY
The WebGL2RenderingContext.TEXTURE_BINDING_2D_ARRAY const.
TEXTURE_BINDING_3D
The WebGL2RenderingContext.TEXTURE_BINDING_3D const.
TEXTURE_BINDING_CUBE_MAP
The WebGL2RenderingContext.TEXTURE_BINDING_CUBE_MAP const.
TEXTURE_COMPARE_FUNC
The WebGL2RenderingContext.TEXTURE_COMPARE_FUNC const.
TEXTURE_COMPARE_MODE
The WebGL2RenderingContext.TEXTURE_COMPARE_MODE const.
TEXTURE_CUBE_MAP
The WebGL2RenderingContext.TEXTURE_CUBE_MAP const.
TEXTURE_CUBE_MAP_NEGATIVE_X
The WebGL2RenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_X const.
TEXTURE_CUBE_MAP_NEGATIVE_Y
The WebGL2RenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Y const.
TEXTURE_CUBE_MAP_NEGATIVE_Z
The WebGL2RenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Z const.
TEXTURE_CUBE_MAP_POSITIVE_X
The WebGL2RenderingContext.TEXTURE_CUBE_MAP_POSITIVE_X const.
TEXTURE_CUBE_MAP_POSITIVE_Y
The WebGL2RenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Y const.
TEXTURE_CUBE_MAP_POSITIVE_Z
The WebGL2RenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Z const.
TEXTURE_IMMUTABLE_FORMAT
The WebGL2RenderingContext.TEXTURE_IMMUTABLE_FORMAT const.
TEXTURE_IMMUTABLE_LEVELS
The WebGL2RenderingContext.TEXTURE_IMMUTABLE_LEVELS const.
TEXTURE_MAG_FILTER
The WebGL2RenderingContext.TEXTURE_MAG_FILTER const.
TEXTURE_MAX_LEVEL
The WebGL2RenderingContext.TEXTURE_MAX_LEVEL const.
TEXTURE_MAX_LOD
The WebGL2RenderingContext.TEXTURE_MAX_LOD const.
TEXTURE_MIN_FILTER
The WebGL2RenderingContext.TEXTURE_MIN_FILTER const.
TEXTURE_MIN_LOD
The WebGL2RenderingContext.TEXTURE_MIN_LOD const.
TEXTURE_WRAP_R
The WebGL2RenderingContext.TEXTURE_WRAP_R const.
TEXTURE_WRAP_S
The WebGL2RenderingContext.TEXTURE_WRAP_S const.
TEXTURE_WRAP_T
The WebGL2RenderingContext.TEXTURE_WRAP_T const.
TIMEOUT_EXPIRED
The WebGL2RenderingContext.TIMEOUT_EXPIRED const.
TIMEOUT_IGNORED
The WebGL2RenderingContext.TIMEOUT_IGNORED const.
TRANSFORM_FEEDBACK
The WebGL2RenderingContext.TRANSFORM_FEEDBACK const.
TRANSFORM_FEEDBACK_ACTIVE
The WebGL2RenderingContext.TRANSFORM_FEEDBACK_ACTIVE const.
TRANSFORM_FEEDBACK_BINDING
The WebGL2RenderingContext.TRANSFORM_FEEDBACK_BINDING const.
TRANSFORM_FEEDBACK_BUFFER
The WebGL2RenderingContext.TRANSFORM_FEEDBACK_BUFFER const.
TRANSFORM_FEEDBACK_BUFFER_BINDING
The WebGL2RenderingContext.TRANSFORM_FEEDBACK_BUFFER_BINDING const.
TRANSFORM_FEEDBACK_BUFFER_MODE
The WebGL2RenderingContext.TRANSFORM_FEEDBACK_BUFFER_MODE const.
TRANSFORM_FEEDBACK_BUFFER_SIZE
The WebGL2RenderingContext.TRANSFORM_FEEDBACK_BUFFER_SIZE const.
TRANSFORM_FEEDBACK_BUFFER_START
The WebGL2RenderingContext.TRANSFORM_FEEDBACK_BUFFER_START const.
TRANSFORM_FEEDBACK_PAUSED
The WebGL2RenderingContext.TRANSFORM_FEEDBACK_PAUSED const.
TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN
The WebGL2RenderingContext.TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN const.
TRANSFORM_FEEDBACK_VARYINGS
The WebGL2RenderingContext.TRANSFORM_FEEDBACK_VARYINGS const.
TRIANGLES
The WebGL2RenderingContext.TRIANGLES const.
TRIANGLE_FAN
The WebGL2RenderingContext.TRIANGLE_FAN const.
TRIANGLE_STRIP
The WebGL2RenderingContext.TRIANGLE_STRIP const.
UNIFORM_ARRAY_STRIDE
The WebGL2RenderingContext.UNIFORM_ARRAY_STRIDE const.
UNIFORM_BLOCK_ACTIVE_UNIFORMS
The WebGL2RenderingContext.UNIFORM_BLOCK_ACTIVE_UNIFORMS const.
UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES
The WebGL2RenderingContext.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES const.
UNIFORM_BLOCK_BINDING
The WebGL2RenderingContext.UNIFORM_BLOCK_BINDING const.
UNIFORM_BLOCK_DATA_SIZE
The WebGL2RenderingContext.UNIFORM_BLOCK_DATA_SIZE const.
UNIFORM_BLOCK_INDEX
The WebGL2RenderingContext.UNIFORM_BLOCK_INDEX const.
UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER
The WebGL2RenderingContext.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER const.
UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER
The WebGL2RenderingContext.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER const.
UNIFORM_BUFFER
The WebGL2RenderingContext.UNIFORM_BUFFER const.
UNIFORM_BUFFER_BINDING
The WebGL2RenderingContext.UNIFORM_BUFFER_BINDING const.
UNIFORM_BUFFER_OFFSET_ALIGNMENT
The WebGL2RenderingContext.UNIFORM_BUFFER_OFFSET_ALIGNMENT const.
UNIFORM_BUFFER_SIZE
The WebGL2RenderingContext.UNIFORM_BUFFER_SIZE const.
UNIFORM_BUFFER_START
The WebGL2RenderingContext.UNIFORM_BUFFER_START const.
UNIFORM_IS_ROW_MAJOR
The WebGL2RenderingContext.UNIFORM_IS_ROW_MAJOR const.
UNIFORM_MATRIX_STRIDE
The WebGL2RenderingContext.UNIFORM_MATRIX_STRIDE const.
UNIFORM_OFFSET
The WebGL2RenderingContext.UNIFORM_OFFSET const.
UNIFORM_SIZE
The WebGL2RenderingContext.UNIFORM_SIZE const.
UNIFORM_TYPE
The WebGL2RenderingContext.UNIFORM_TYPE const.
UNPACK_ALIGNMENT
The WebGL2RenderingContext.UNPACK_ALIGNMENT const.
UNPACK_COLORSPACE_CONVERSION_WEBGL
The WebGL2RenderingContext.UNPACK_COLORSPACE_CONVERSION_WEBGL const.
UNPACK_FLIP_Y_WEBGL
The WebGL2RenderingContext.UNPACK_FLIP_Y_WEBGL const.
UNPACK_IMAGE_HEIGHT
The WebGL2RenderingContext.UNPACK_IMAGE_HEIGHT const.
UNPACK_PREMULTIPLY_ALPHA_WEBGL
The WebGL2RenderingContext.UNPACK_PREMULTIPLY_ALPHA_WEBGL const.
UNPACK_ROW_LENGTH
The WebGL2RenderingContext.UNPACK_ROW_LENGTH const.
UNPACK_SKIP_IMAGES
The WebGL2RenderingContext.UNPACK_SKIP_IMAGES const.
UNPACK_SKIP_PIXELS
The WebGL2RenderingContext.UNPACK_SKIP_PIXELS const.
UNPACK_SKIP_ROWS
The WebGL2RenderingContext.UNPACK_SKIP_ROWS const.
UNSIGNALED
The WebGL2RenderingContext.UNSIGNALED const.
UNSIGNED_BYTE
The WebGL2RenderingContext.UNSIGNED_BYTE const.
UNSIGNED_INT
The WebGL2RenderingContext.UNSIGNED_INT const.
UNSIGNED_INT_2_10_10_10_REV
The WebGL2RenderingContext.UNSIGNED_INT_2_10_10_10_REV const.
UNSIGNED_INT_5_9_9_9_REV
The WebGL2RenderingContext.UNSIGNED_INT_5_9_9_9_REV const.
UNSIGNED_INT_10F_11F_11F_REV
The WebGL2RenderingContext.UNSIGNED_INT_10F_11F_11F_REV const.
UNSIGNED_INT_24_8
The WebGL2RenderingContext.UNSIGNED_INT_24_8 const.
UNSIGNED_INT_SAMPLER_2D
The WebGL2RenderingContext.UNSIGNED_INT_SAMPLER_2D const.
UNSIGNED_INT_SAMPLER_2D_ARRAY
The WebGL2RenderingContext.UNSIGNED_INT_SAMPLER_2D_ARRAY const.
UNSIGNED_INT_SAMPLER_3D
The WebGL2RenderingContext.UNSIGNED_INT_SAMPLER_3D const.
UNSIGNED_INT_SAMPLER_CUBE
The WebGL2RenderingContext.UNSIGNED_INT_SAMPLER_CUBE const.
UNSIGNED_INT_VEC2
The WebGL2RenderingContext.UNSIGNED_INT_VEC2 const.
UNSIGNED_INT_VEC3
The WebGL2RenderingContext.UNSIGNED_INT_VEC3 const.
UNSIGNED_INT_VEC4
The WebGL2RenderingContext.UNSIGNED_INT_VEC4 const.
UNSIGNED_NORMALIZED
The WebGL2RenderingContext.UNSIGNED_NORMALIZED const.
UNSIGNED_SHORT
The WebGL2RenderingContext.UNSIGNED_SHORT const.
UNSIGNED_SHORT_4_4_4_4
The WebGL2RenderingContext.UNSIGNED_SHORT_4_4_4_4 const.
UNSIGNED_SHORT_5_5_5_1
The WebGL2RenderingContext.UNSIGNED_SHORT_5_5_5_1 const.
UNSIGNED_SHORT_5_6_5
The WebGL2RenderingContext.UNSIGNED_SHORT_5_6_5 const.
VALIDATE_STATUS
The WebGL2RenderingContext.VALIDATE_STATUS const.
VENDOR
The WebGL2RenderingContext.VENDOR const.
VERSION
The WebGL2RenderingContext.VERSION const.
VERTEX_ARRAY_BINDING
The WebGL2RenderingContext.VERTEX_ARRAY_BINDING const.
VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
The WebGL2RenderingContext.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING const.
VERTEX_ATTRIB_ARRAY_DIVISOR
The WebGL2RenderingContext.VERTEX_ATTRIB_ARRAY_DIVISOR const.
VERTEX_ATTRIB_ARRAY_ENABLED
The WebGL2RenderingContext.VERTEX_ATTRIB_ARRAY_ENABLED const.
VERTEX_ATTRIB_ARRAY_INTEGER
The WebGL2RenderingContext.VERTEX_ATTRIB_ARRAY_INTEGER const.
VERTEX_ATTRIB_ARRAY_NORMALIZED
The WebGL2RenderingContext.VERTEX_ATTRIB_ARRAY_NORMALIZED const.
VERTEX_ATTRIB_ARRAY_POINTER
The WebGL2RenderingContext.VERTEX_ATTRIB_ARRAY_POINTER const.
VERTEX_ATTRIB_ARRAY_SIZE
The WebGL2RenderingContext.VERTEX_ATTRIB_ARRAY_SIZE const.
VERTEX_ATTRIB_ARRAY_STRIDE
The WebGL2RenderingContext.VERTEX_ATTRIB_ARRAY_STRIDE const.
VERTEX_ATTRIB_ARRAY_TYPE
The WebGL2RenderingContext.VERTEX_ATTRIB_ARRAY_TYPE const.
VERTEX_SHADER
The WebGL2RenderingContext.VERTEX_SHADER const.
VIEWPORT
The WebGL2RenderingContext.VIEWPORT const.
WAIT_FAILED
The WebGL2RenderingContext.WAIT_FAILED const.
ZERO
The WebGL2RenderingContext.ZERO const.

Traits§

Add
The addition operator +.
AddAssign
The addition assignment operator +=.
AsBytes
Trait for converting data to byte slices.
AsStaticRefDeprecated
A cheap reference-to-reference conversion. Used to convert a value to a reference value with 'static lifetime within generic code.
Assign
Provides a generic interface for setting a component of a certain type on an object.
AssignWithType
The AssignWithType trait provides a mechanism to set a component on an object, utilizing the type information explicitly. This trait extends the functionality of Assign by allowing implementers to specify the component’s type at the method call site, enhancing expressiveness in code that manipulates object states.
BTreeMapExt
Provides an extension method for hash maps to facilitate the use of the builder pattern.
BTreeSetExt
Provides an extension method for binary tree sets to facilitate the use of the builder pattern.
BinaryHeapExt
Provides an extension method for binary heaps to facilitate the use of the builder pattern.
CloneDyn
A trait to upcast a clonable entity and clone it. It’s implemented for all entities which can be cloned.
Collection
Represents a collection by defining the types of entries and values it handles.
CollectionAdd
Provides functionality to add individual entries to a collection.
CollectionAssign
Defines the capability to replace all entries in a collection with a new set of entries.
CollectionValToEntry
Provides a mechanism for transforming a value back into a collection-specific entry format.
DebugLog
Div
The division operator /.
DivAssign
The division assignment operator /=.
EntityToDefinition
Maps a type of entity to its corresponding former definition. This trait provides a linkage between the entity and its definition, allowing the formation logic to understand what definition to apply during the formation process.
EntityToDefinitionTypes
Provides a mapping between a type of entity and its associated formation type definitions.
EntityToFormer
Maps a type of entity to its corresponding former. This trait binds an entity type to a specific former, facilitating the use of custom formers in complex formation scenarios.
EntityToStorage
Maps a type of entity to its storage type. This trait defines what storage structure is used to hold the interim state of an entity during its formation.
EntryToVal
Facilitates the conversion of collection entries to their corresponding value representations.
EnumCount
A trait for capturing the number of variants in Enum. This trait can be autoderived by strum_macros.
EnumMessage
Associates additional pieces of information with an Enum. This can be autoimplemented by deriving EnumMessage and annotating your variants with #[strum(message="...")].
EnumProperty
EnumProperty is a trait that makes it possible to store additional information with enum variants. This trait is designed to be used with the macro of the same name in the strum_macros crate. Currently, the only string literals are supported in attributes, the other methods will be implemented as additional attribute types become stabilized.
ErrWith
This trait allows adding extra context or information to an error, creating a tuple of the additional context and the original error. This is particularly useful for error handling when you want to include more details in the error without losing the original error value.
Error
Error is a trait representing the basic expectations for error values, i.e., values of type E in Result<T, E>.
ErrorTrait
Error is a trait representing the basic expectations for error values, i.e., values of type E in Result<T, E>.
FormerBegin
A trait for initiating a structured subforming process with contextual and intermediary storage linkage.
FormerDefinition
Expands on FormerDefinitionTypes by incorporating an ending mechanism for the formation process. This trait connects the formation types with a specific endpoint, defining how the formation process concludes, including any necessary transformations or validations.
FormerDefinitionTypes
Defines the fundamental components involved in the formation of an entity. This trait specifies the types of storage, the formed entity, and the context used during the formation process.
FormerMutator
Provides a mechanism for mutating the context and storage just before the forming process is completed.
FormingEnd
Defines a handler for the end of a subforming process, enabling the return of the original context.
From1
Constructor with single argument.
From2
Constructor with two arguments.
From3
Constructor with three arguments.
HashMapExt
Provides an extension method for hash maps to facilitate the use of the builder pattern.
HashSetExt
Provides an extension method for HashSet to facilitate the use of the builder pattern.
Into
A value-to-value conversion that consumes the input value. The opposite of From.
Into1
value-to-value conversion that consumes the input value. Change left and rught, but keep semantic of `From1``.
IntoEnumIterator
This trait designates that an Enum can be iterated over. It can be auto generated using strum_macros on your behalf.
IntoIterator
Conversion into an Iterator.
IntoVectorDataType
Trait for converting types into VectorDataType.
JsCast
A trait for checked and unchecked casting between JS types.
LinkedListExt
Provides an extension method for lists to facilitate the use of the builder pattern.
Log
A trait encapsulating the operations required of a logger.
Mul
The multiplication operator *.
MulAssign
The multiplication assignment operator *=.
OptionExt
Extension trait to provide a method for setting a component on an Option<Self> if the Option is currently None. If the Option is Some, the method will delegate to the Assign trait’s assign method.
Pod
Marker trait for “plain old data”.
Storage
Defines the storage interface for entities being constructed using a forming pattern.
StoragePreform
Provides a mechanism to finalize the forming process by converting storage into its final formed state.
Sub
The subtraction operator -.
SubAssign
The subtraction assignment operator -=.
Sum
Trait to represent types that can be created by summing up an iterator.
TryInto
An attempted conversion that consumes self, which may or may not be expensive.
UniformMatrixUpload
Trait for uploading matrix uniform data to a WebGL shader.
UniformUpload
Trait for uploading uniform data to a WebGL shader.
ValToEntry
Facilitates the conversion of values back into entries for specific collection types.
VariantIterator
VariantMetadata
VariantNames
A trait for retrieving the names of each variant in Enum. This trait can be autoderived by strum_macros.
VecDequeExt
Provides an extension method for vector deques to facilitate the use of the builder pattern.
VecExt
Provides an extension method for vectors to facilitate the use of the builder pattern.

Functions§

clone
True clone which is applicable not only to clonable entities, but to trait objects implementing CloneDyn.
clone_into_box
Clone boxed dyn.
create
Creates a new WebGL buffer.
future_to_promise
Converts a Rust Future into a JavaScript Promise.
logger
Returns a reference to the logger.
max_level
Returns the current maximum log level.
request_animation_frame
set_boxed_logger
Sets the global logger to a Box<Log>.
set_logger
Sets the global logger to a &'static Log.
set_logger_racy
A thread-unsafe version of set_logger.
set_max_level
Sets the global maximum log level.
set_max_level_racy
A thread-unsafe version of set_max_level.
spawn_local
Runs a Rust Future on the current thread.
upload
Uploads data to a WebGL ARRAY_BUFFER.
upload
Uploads data to a WebGL ELEMENT_ARRAY_BUFFER.

Type Aliases§

BTreeMapFormer
Provides a streamlined builder interface for constructing hash map-like collections.
BTreeSetFormer
Provides a streamlined builder interface for constructing binary tree set-like collections.
BinaryHeapFormer
Provides a streamlined builder interface for constructing binary heap-like collections.
HashMapFormer
Provides a streamlined builder interface for constructing hash map-like collections.
HashSetFormer
Provides a concise alias for CollectionFormer configured specifically for HashSet-like collections.
LinkedListFormer
Provides a streamlined builder interface for constructing list-like collections.
ResultWithReport
A type alias for a Result that contains an error which is a tuple of a report and an original error.
VecDequeFormer
Provides a streamlined builder interface for constructing vector deque-like collections.
VectorFormer
Provides a streamlined builder interface for constructing vector-like collections.

Attribute Macros§

clone_dyn
Derive macro to generate former for a structure. Former is variation of Builder Pattern.
phantom
Provides an automatic PhantomData field for a struct based on its generic types.

Derive Macros§

Add
What #[derive(Add)] generates
AddAssign
What #[derive(AddAssign)] generates
AsMut
Derive macro to implement AsMut when-ever it’s possible to do automatically.
AsRef
Derive macro to implement AsRef when-ever it’s possible to do automatically.
AsRefStr
Converts enum variants to &'static str.
AsStaticStr
Assign
Derives the Assign trait for struct fields, allowing each field to be set with a value that can be converted into the field’s type.
ComponentFrom
Macro to implement From for each component (field) of a structure. This macro simplifies the creation of From trait implementations for struct fields, enabling easy conversion from a struct reference to its field types.
ComponentsAssign
Derives the ComponentsAssign trait for a struct, enabling components_assign which set all fields at once.
Constructor
What #[derive(Constructor)] generates
Deref
Derive macro to implement Deref when-ever it’s possible to do automatically.
DerefMut
Derive macro to implement Deref when-ever it’s possible to do automatically.
Display
Div
What #[derive(Mul)] generates
DivAssign
What #[derive(MulAssign)] generates
EnumCount
Add a constant usize equal to the number of variants.
EnumDiscriminants
Generate a new type with only the discriminant names.
EnumIs
Generated is_*() methods for each variant. E.g. Color.is_red().
EnumIter
Creates a new type that iterates of the variants of an enum.
EnumMessage
Add a verbose message to an enum variant.
EnumProperty
Add custom properties to enum variants.
EnumString
Converts strings to enum variants based on their name.
EnumTryAs
Generated try_as_*() methods for all tuple-style variants. E.g. Message.try_as_write().
EnumVariantNames
Implements Strum::VariantNames which adds an associated constant VARIANTS which is an array of discriminant names.
Error
Using #[derive(Error)]
Former
Derive macro for generating a Former struct, applying a Builder Pattern to the annotated struct.
From
Provides an automatic From implementation for struct wrapping a single value.
FromComponents
A procedural macro to automatically derive the From<T> trait implementation for a struct, enabling instances of one type to be converted from instances of another type.
FromRepr
Add a function to enum that allows accessing variants by its discriminant
FromStr
Index
Provides an automatic Index trait implementation when-ever it’s possible.
IndexMut
Provides an automatic IndexMut trait implementation when-ever it’s possible.
InnerFrom
Derive macro to implement From converting outer type into inner when-ever it’s possible to do automatically.
Into
What #[derive(Into)] generates
IntoIterator
Using #[derive(IntoIterator)]
IntoStaticStr
Implements From<MyEnum> for &'static str on an enum.
IsVariant
What #[derive(IsVariant)] generates
Mul
What #[derive(Mul)] generates
MulAssign
What #[derive(MulAssign)] generates
New
Provides an automatic new implementation for struct wrapping a single value.
Not
Provides an automatic Not trait implementation for struct.
Pod
Derive the Pod trait for a struct
Sub
What #[derive(Add)] generates
SubAssign
What #[derive(AddAssign)] generates
Sum
Using #[derive(Sum)]
ToString
implements std::string::ToString on an enum
TryInto
What #[derive(TryInto)] generates
Unwrap
What #[derive(Unwrap)] generates
VariadicFrom
The derive_variadic_from macro is designed to provide a way to implement the From-like traits for structs with a variable number of fields, allowing them to be constructed from tuples of different lengths or from individual arguments. This functionality is particularly useful for creating flexible constructors that enable different methods of instantiation for a struct. By automating the implementation of traits, this macro reduces boilerplate code and enhances code readability and maintainability.