pub struct Context {
raw: GlFns,
extensions: HashSet<String>,
constants: Constants,
version: Version,
debug_callback: Option<DebugCallbackRawPtr>,
}
Expand description
Re-exported glow::Context
.
Fields§
§raw: GlFns
§extensions: HashSet<String>
§constants: Constants
§version: Version
§debug_callback: Option<DebugCallbackRawPtr>
Implementations§
source§impl Context
impl Context
pub unsafe fn from_loader_function_cstr<F>(loader_function: F) -> Context
pub unsafe fn from_loader_function<F>(loader_function: F) -> Context
sourcepub unsafe fn create_texture_from_gl_name(gl_name: u32) -> NativeTexture
👎Deprecated: Use the NativeTexture constructor instead
pub unsafe fn create_texture_from_gl_name(gl_name: u32) -> NativeTexture
Creates a texture from an external GL name.
This can be useful when a texture is created outside of glow (e.g. OpenXR surface) but glow still needs access to it for rendering.
sourcepub unsafe fn create_framebuffer_from_gl_name(gl_name: u32) -> NativeFramebuffer
👎Deprecated: Use the NativeFramebuffer constructor instead
pub unsafe fn create_framebuffer_from_gl_name(gl_name: u32) -> NativeFramebuffer
Creates a framebuffer from an external GL name.
This can be useful when a framebuffer is created outside of glow (e.g: via surfman
or another
crate that supports sharing of buffers between GL contexts), but glow needs to set it as a target.
Trait Implementations§
source§impl HasContext for Context
impl HasContext for Context
type Shader = NativeShader
type Program = NativeProgram
type Buffer = NativeBuffer
type VertexArray = NativeVertexArray
type Texture = NativeTexture
type Sampler = NativeSampler
type Fence = NativeFence
type Framebuffer = NativeFramebuffer
type Renderbuffer = NativeRenderbuffer
type Query = NativeQuery
type UniformLocation = NativeUniformLocation
type TransformFeedback = NativeTransformFeedback
fn supported_extensions(&self) -> &HashSet<String>
fn supports_debug(&self) -> bool
fn version(&self) -> &Version
unsafe fn create_framebuffer( &self, ) -> Result<<Context as HasContext>::Framebuffer, String>
unsafe fn create_named_framebuffer( &self, ) -> Result<<Context as HasContext>::Framebuffer, String>
unsafe fn is_framebuffer( &self, framebuffer: <Context as HasContext>::Framebuffer, ) -> bool
unsafe fn create_query(&self) -> Result<<Context as HasContext>::Query, String>
unsafe fn create_renderbuffer( &self, ) -> Result<<Context as HasContext>::Renderbuffer, String>
unsafe fn is_renderbuffer( &self, renderbuffer: <Context as HasContext>::Renderbuffer, ) -> bool
unsafe fn create_sampler( &self, ) -> Result<<Context as HasContext>::Sampler, String>
unsafe fn create_shader( &self, shader_type: u32, ) -> Result<<Context as HasContext>::Shader, String>
unsafe fn is_shader(&self, shader: <Context as HasContext>::Shader) -> bool
unsafe fn create_texture( &self, ) -> Result<<Context as HasContext>::Texture, String>
unsafe fn create_named_texture( &self, target: u32, ) -> Result<<Context as HasContext>::Texture, String>
unsafe fn is_texture(&self, texture: <Context as HasContext>::Texture) -> bool
unsafe fn delete_shader(&self, shader: <Context as HasContext>::Shader)
unsafe fn shader_source( &self, shader: <Context as HasContext>::Shader, source: &str, )
unsafe fn compile_shader(&self, shader: <Context as HasContext>::Shader)
unsafe fn get_shader_completion_status( &self, shader: <Context as HasContext>::Shader, ) -> bool
unsafe fn get_shader_compile_status( &self, shader: <Context as HasContext>::Shader, ) -> bool
unsafe fn get_shader_info_log( &self, shader: <Context as HasContext>::Shader, ) -> String
unsafe fn get_shader_precision_format( &self, shader_type: u32, precision_type: u32, ) -> Option<ShaderPrecisionFormat>
unsafe fn get_tex_image( &self, target: u32, level: i32, format: u32, ty: u32, pixels: PixelPackData<'_>, )
unsafe fn create_program( &self, ) -> Result<<Context as HasContext>::Program, String>
unsafe fn is_program(&self, program: <Context as HasContext>::Program) -> bool
unsafe fn delete_program(&self, program: <Context as HasContext>::Program)
unsafe fn attach_shader( &self, program: <Context as HasContext>::Program, shader: <Context as HasContext>::Shader, )
unsafe fn detach_shader( &self, program: <Context as HasContext>::Program, shader: <Context as HasContext>::Shader, )
unsafe fn link_program(&self, program: <Context as HasContext>::Program)
unsafe fn validate_program(&self, program: <Context as HasContext>::Program)
unsafe fn get_program_completion_status( &self, program: <Context as HasContext>::Program, ) -> bool
unsafe fn get_program_link_status( &self, program: <Context as HasContext>::Program, ) -> bool
unsafe fn get_program_validate_status( &self, program: <Context as HasContext>::Program, ) -> bool
unsafe fn get_program_parameter_i32( &self, program: <Context as HasContext>::Program, parameter: u32, ) -> i32
unsafe fn get_program_info_log( &self, program: <Context as HasContext>::Program, ) -> String
unsafe fn get_program_resource_i32( &self, program: <Context as HasContext>::Program, interface: u32, index: u32, properties: &[u32], ) -> Vec<i32>
unsafe fn program_uniform_1_i32( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, x: i32, )
unsafe fn program_uniform_2_i32( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, x: i32, y: i32, )
unsafe fn program_uniform_3_i32( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, x: i32, y: i32, z: i32, )
unsafe fn program_uniform_4_i32( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, x: i32, y: i32, z: i32, w: i32, )
unsafe fn program_uniform_1_i32_slice( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, v: &[i32], )
unsafe fn program_uniform_2_i32_slice( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, v: &[i32], )
unsafe fn program_uniform_3_i32_slice( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, v: &[i32], )
unsafe fn program_uniform_4_i32_slice( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, v: &[i32], )
unsafe fn program_uniform_1_u32( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, x: u32, )
unsafe fn program_uniform_2_u32( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, x: u32, y: u32, )
unsafe fn program_uniform_3_u32( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, x: u32, y: u32, z: u32, )
unsafe fn program_uniform_4_u32( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, x: u32, y: u32, z: u32, w: u32, )
unsafe fn program_uniform_1_u32_slice( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, v: &[u32], )
unsafe fn program_uniform_2_u32_slice( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, v: &[u32], )
unsafe fn program_uniform_3_u32_slice( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, v: &[u32], )
unsafe fn program_uniform_4_u32_slice( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, v: &[u32], )
unsafe fn program_uniform_1_f32( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, x: f32, )
unsafe fn program_uniform_2_f32( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, x: f32, y: f32, )
unsafe fn program_uniform_3_f32( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, x: f32, y: f32, z: f32, )
unsafe fn program_uniform_4_f32( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, x: f32, y: f32, z: f32, w: f32, )
unsafe fn program_uniform_1_f32_slice( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, v: &[f32], )
unsafe fn program_uniform_2_f32_slice( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, v: &[f32], )
unsafe fn program_uniform_3_f32_slice( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, v: &[f32], )
unsafe fn program_uniform_4_f32_slice( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, v: &[f32], )
unsafe fn program_uniform_matrix_2_f32_slice( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, transpose: bool, v: &[f32], )
unsafe fn program_uniform_matrix_2x3_f32_slice( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, transpose: bool, v: &[f32], )
unsafe fn program_uniform_matrix_2x4_f32_slice( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, transpose: bool, v: &[f32], )
unsafe fn program_uniform_matrix_3x2_f32_slice( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, transpose: bool, v: &[f32], )
unsafe fn program_uniform_matrix_3_f32_slice( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, transpose: bool, v: &[f32], )
unsafe fn program_uniform_matrix_3x4_f32_slice( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, transpose: bool, v: &[f32], )
unsafe fn program_uniform_matrix_4x2_f32_slice( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, transpose: bool, v: &[f32], )
unsafe fn program_uniform_matrix_4x3_f32_slice( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, transpose: bool, v: &[f32], )
unsafe fn program_uniform_matrix_4_f32_slice( &self, program: <Context as HasContext>::Program, location: Option<&<Context as HasContext>::UniformLocation>, transpose: bool, v: &[f32], )
unsafe fn program_binary_retrievable_hint( &self, program: <Context as HasContext>::Program, value: bool, )
unsafe fn get_program_binary( &self, program: <Context as HasContext>::Program, ) -> Option<ProgramBinary>
unsafe fn program_binary( &self, program: <Context as HasContext>::Program, binary: &ProgramBinary, )
unsafe fn get_active_uniforms( &self, program: <Context as HasContext>::Program, ) -> u32
unsafe fn get_active_uniforms_parameter( &self, program: <Context as HasContext>::Program, uniforms: &[u32], pname: u32, ) -> Vec<i32>
unsafe fn get_active_uniform( &self, program: <Context as HasContext>::Program, index: u32, ) -> Option<ActiveUniform>
unsafe fn use_program(&self, program: Option<<Context as HasContext>::Program>)
unsafe fn create_buffer( &self, ) -> Result<<Context as HasContext>::Buffer, String>
unsafe fn create_named_buffer( &self, ) -> Result<<Context as HasContext>::Buffer, String>
unsafe fn is_buffer(&self, buffer: <Context as HasContext>::Buffer) -> bool
unsafe fn bind_buffer( &self, target: u32, buffer: Option<<Context as HasContext>::Buffer>, )
unsafe fn bind_buffer_base( &self, target: u32, index: u32, buffer: Option<<Context as HasContext>::Buffer>, )
unsafe fn bind_buffer_range( &self, target: u32, index: u32, buffer: Option<<Context as HasContext>::Buffer>, offset: i32, size: i32, )
unsafe fn bind_vertex_buffer( &self, binding_index: u32, buffer: Option<<Context as HasContext>::Buffer>, offset: i32, stride: i32, )
unsafe fn bind_framebuffer( &self, target: u32, framebuffer: Option<<Context as HasContext>::Framebuffer>, )
unsafe fn bind_renderbuffer( &self, target: u32, renderbuffer: Option<<Context as HasContext>::Renderbuffer>, )
unsafe fn blit_framebuffer( &self, src_x0: i32, src_y0: i32, src_x1: i32, src_y1: i32, dst_x0: i32, dst_y0: i32, dst_x1: i32, dst_y1: i32, mask: u32, filter: u32, )
unsafe fn blit_named_framebuffer( &self, read_buffer: Option<<Context as HasContext>::Framebuffer>, draw_buffer: Option<<Context as HasContext>::Framebuffer>, src_x0: i32, src_y0: i32, src_x1: i32, src_y1: i32, dst_x0: i32, dst_y0: i32, dst_x1: i32, dst_y1: i32, mask: u32, filter: u32, )
unsafe fn create_vertex_array( &self, ) -> Result<<Context as HasContext>::VertexArray, String>
unsafe fn create_named_vertex_array( &self, ) -> Result<<Context as HasContext>::VertexArray, String>
unsafe fn delete_vertex_array( &self, vertex_array: <Context as HasContext>::VertexArray, )
unsafe fn bind_vertex_array( &self, vertex_array: Option<<Context as HasContext>::VertexArray>, )
unsafe fn clear_color(&self, red: f32, green: f32, blue: f32, alpha: f32)
unsafe fn supports_f64_precision(&self) -> bool
unsafe fn clear_depth_f64(&self, depth: f64)
unsafe fn clear_depth_f32(&self, depth: f32)
unsafe fn clear_depth(&self, depth: f64)
unsafe fn clear_stencil(&self, stencil: i32)
unsafe fn clear(&self, mask: u32)
unsafe fn patch_parameter_i32(&self, parameter: u32, value: i32)
unsafe fn pixel_store_i32(&self, parameter: u32, value: i32)
unsafe fn pixel_store_bool(&self, parameter: u32, value: bool)
unsafe fn get_frag_data_location( &self, program: <Context as HasContext>::Program, name: &str, ) -> i32
unsafe fn bind_frag_data_location( &self, program: <Context as HasContext>::Program, color_number: u32, name: &str, )
unsafe fn buffer_data_size(&self, target: u32, size: i32, usage: u32)
unsafe fn named_buffer_data_size( &self, buffer: <Context as HasContext>::Buffer, size: i32, usage: u32, )
unsafe fn buffer_data_u8_slice(&self, target: u32, data: &[u8], usage: u32)
unsafe fn named_buffer_data_u8_slice( &self, buffer: <Context as HasContext>::Buffer, data: &[u8], usage: u32, )
unsafe fn buffer_sub_data_u8_slice( &self, target: u32, offset: i32, src_data: &[u8], )
unsafe fn named_buffer_sub_data_u8_slice( &self, buffer: <Context as HasContext>::Buffer, offset: i32, src_data: &[u8], )
unsafe fn get_buffer_sub_data( &self, target: u32, offset: i32, dst_data: &mut [u8], )
unsafe fn buffer_storage( &self, target: u32, size: i32, data: Option<&[u8]>, flags: u32, )
unsafe fn check_framebuffer_status(&self, target: u32) -> u32
unsafe fn check_named_framebuffer_status( &self, framebuffer: Option<<Context as HasContext>::Framebuffer>, target: u32, ) -> u32
unsafe fn clear_buffer_i32_slice( &self, target: u32, draw_buffer: u32, values: &[i32], )
unsafe fn clear_buffer_u32_slice( &self, target: u32, draw_buffer: u32, values: &[u32], )
unsafe fn clear_buffer_f32_slice( &self, target: u32, draw_buffer: u32, values: &[f32], )
unsafe fn clear_buffer_depth_stencil( &self, target: u32, draw_buffer: u32, depth: f32, stencil: i32, )
unsafe fn clear_named_framebuffer_i32_slice( &self, framebuffer: Option<<Context as HasContext>::Framebuffer>, target: u32, draw_buffer: u32, values: &[i32], )
unsafe fn clear_named_framebuffer_u32_slice( &self, framebuffer: Option<<Context as HasContext>::Framebuffer>, target: u32, draw_buffer: u32, values: &[u32], )
unsafe fn clear_named_framebuffer_f32_slice( &self, framebuffer: Option<<Context as HasContext>::Framebuffer>, target: u32, draw_buffer: u32, values: &[f32], )
unsafe fn clear_named_framebuffer_depth_stencil( &self, framebuffer: Option<<Context as HasContext>::Framebuffer>, target: u32, draw_buffer: u32, depth: f32, stencil: i32, )
unsafe fn client_wait_sync( &self, fence: <Context as HasContext>::Fence, flags: u32, timeout: i32, ) -> u32
unsafe fn get_sync_parameter_i32( &self, fence: <Context as HasContext>::Fence, parameter: u32, ) -> i32
unsafe fn wait_sync( &self, fence: <Context as HasContext>::Fence, flags: u32, timeout: u64, )
unsafe fn copy_buffer_sub_data( &self, src_target: u32, dst_target: u32, src_offset: i32, dst_offset: i32, size: i32, )
unsafe fn copy_image_sub_data( &self, src_name: <Context as HasContext>::Texture, src_target: u32, src_level: i32, src_x: i32, src_y: i32, src_z: i32, dst_name: <Context as HasContext>::Texture, dst_target: u32, dst_level: i32, dst_x: i32, dst_y: i32, dst_z: i32, src_width: i32, src_height: i32, src_depth: i32, )
unsafe fn copy_tex_image_2d( &self, target: u32, level: i32, internal_format: u32, x: i32, y: i32, width: i32, height: i32, border: i32, )
unsafe fn copy_tex_sub_image_2d( &self, target: u32, level: i32, x_offset: i32, y_offset: i32, x: i32, y: i32, width: i32, height: i32, )
unsafe fn copy_tex_sub_image_3d( &self, target: u32, level: i32, x_offset: i32, y_offset: i32, z_offset: i32, x: i32, y: i32, width: i32, height: i32, )
unsafe fn delete_buffer(&self, buffer: <Context as HasContext>::Buffer)
unsafe fn delete_framebuffer( &self, framebuffer: <Context as HasContext>::Framebuffer, )
unsafe fn delete_query(&self, query: <Context as HasContext>::Query)
unsafe fn delete_renderbuffer( &self, renderbuffer: <Context as HasContext>::Renderbuffer, )
unsafe fn delete_sampler(&self, sampler: <Context as HasContext>::Sampler)
unsafe fn delete_sync(&self, fence: <Context as HasContext>::Fence)
unsafe fn delete_texture(&self, texture: <Context as HasContext>::Texture)
unsafe fn disable(&self, parameter: u32)
unsafe fn disable_draw_buffer(&self, parameter: u32, draw_buffer: u32)
unsafe fn disable_vertex_attrib_array(&self, index: u32)
unsafe fn dispatch_compute(&self, groups_x: u32, groups_y: u32, groups_z: u32)
unsafe fn dispatch_compute_indirect(&self, offset: i32)
unsafe fn draw_arrays(&self, mode: u32, first: i32, count: i32)
unsafe fn draw_arrays_instanced( &self, mode: u32, first: i32, count: i32, instance_count: i32, )
unsafe fn draw_arrays_instanced_base_instance( &self, mode: u32, first: i32, count: i32, instance_count: i32, base_instance: u32, )
unsafe fn draw_arrays_indirect_offset(&self, mode: u32, offset: i32)
unsafe fn draw_buffer(&self, draw_buffer: u32)
unsafe fn named_framebuffer_draw_buffer( &self, framebuffer: Option<<Context as HasContext>::Framebuffer>, draw_buffer: u32, )
unsafe fn draw_buffers(&self, buffers: &[u32])
unsafe fn named_framebuffer_draw_buffers( &self, framebuffer: Option<<Context as HasContext>::Framebuffer>, buffers: &[u32], )
unsafe fn draw_elements( &self, mode: u32, count: i32, element_type: u32, offset: i32, )
unsafe fn draw_elements_base_vertex( &self, mode: u32, count: i32, element_type: u32, offset: i32, base_vertex: i32, )
unsafe fn draw_elements_instanced( &self, mode: u32, count: i32, element_type: u32, offset: i32, instance_count: i32, )
unsafe fn draw_elements_instanced_base_vertex( &self, mode: u32, count: i32, element_type: u32, offset: i32, instance_count: i32, base_vertex: i32, )
unsafe fn draw_elements_instanced_base_vertex_base_instance( &self, mode: u32, count: i32, element_type: u32, offset: i32, instance_count: i32, base_vertex: i32, base_instance: u32, )
unsafe fn draw_elements_indirect_offset( &self, mode: u32, element_type: u32, offset: i32, )
unsafe fn enable(&self, parameter: u32)
unsafe fn is_enabled(&self, parameter: u32) -> bool
unsafe fn enable_draw_buffer(&self, parameter: u32, draw_buffer: u32)
unsafe fn enable_vertex_array_attrib( &self, vao: <Context as HasContext>::VertexArray, index: u32, )
unsafe fn enable_vertex_attrib_array(&self, index: u32)
unsafe fn flush(&self)
unsafe fn framebuffer_renderbuffer( &self, target: u32, attachment: u32, renderbuffer_target: u32, renderbuffer: Option<<Context as HasContext>::Renderbuffer>, )
unsafe fn framebuffer_texture( &self, target: u32, attachment: u32, texture: Option<<Context as HasContext>::Texture>, level: i32, )
unsafe fn framebuffer_texture_2d( &self, target: u32, attachment: u32, texture_target: u32, texture: Option<<Context as HasContext>::Texture>, level: i32, )
unsafe fn framebuffer_texture_3d( &self, target: u32, attachment: u32, texture_target: u32, texture: Option<<Context as HasContext>::Texture>, level: i32, layer: i32, )
unsafe fn framebuffer_texture_layer( &self, target: u32, attachment: u32, texture: Option<<Context as HasContext>::Texture>, level: i32, layer: i32, )
unsafe fn named_framebuffer_renderbuffer( &self, framebuffer: Option<<Context as HasContext>::Framebuffer>, attachment: u32, renderbuffer_target: u32, renderbuffer: Option<<Context as HasContext>::Renderbuffer>, )
unsafe fn named_framebuffer_texture( &self, framebuffer: Option<<Context as HasContext>::Framebuffer>, attachment: u32, texture: Option<<Context as HasContext>::Texture>, level: i32, )
unsafe fn named_framebuffer_texture_layer( &self, framebuffer: Option<<Context as HasContext>::Framebuffer>, attachment: u32, texture: Option<<Context as HasContext>::Texture>, level: i32, layer: i32, )
unsafe fn front_face(&self, value: u32)
unsafe fn get_error(&self) -> u32
unsafe fn get_tex_parameter_i32(&self, target: u32, parameter: u32) -> i32
unsafe fn get_tex_parameter_f32(&self, target: u32, parameter: u32) -> f32
unsafe fn get_buffer_parameter_i32(&self, target: u32, parameter: u32) -> i32
unsafe fn get_parameter_bool(&self, parameter: u32) -> bool
unsafe fn get_parameter_bool_array<const N: usize>( &self, parameter: u32, ) -> [bool; N]
unsafe fn get_parameter_i32(&self, parameter: u32) -> i32
unsafe fn get_parameter_i32_slice(&self, parameter: u32, out: &mut [i32])
unsafe fn get_parameter_i64(&self, parameter: u32) -> i64
unsafe fn get_parameter_i64_slice(&self, parameter: u32, out: &mut [i64])
unsafe fn get_parameter_indexed_i64(&self, parameter: u32, index: u32) -> i64
unsafe fn get_parameter_f32(&self, parameter: u32) -> f32
unsafe fn get_parameter_f32_slice(&self, parameter: u32, out: &mut [f32])
unsafe fn get_parameter_indexed_i32(&self, parameter: u32, index: u32) -> i32
unsafe fn get_parameter_indexed_string( &self, parameter: u32, index: u32, ) -> String
unsafe fn get_parameter_string(&self, parameter: u32) -> String
unsafe fn get_parameter_buffer( &self, parameter: u32, ) -> Option<<Context as HasContext>::Buffer>
unsafe fn get_parameter_framebuffer( &self, parameter: u32, ) -> Option<<Context as HasContext>::Framebuffer>
unsafe fn get_parameter_program( &self, parameter: u32, ) -> Option<<Context as HasContext>::Program>
unsafe fn get_parameter_renderbuffer( &self, parameter: u32, ) -> Option<<Context as HasContext>::Renderbuffer>
unsafe fn get_parameter_sampler( &self, parameter: u32, ) -> Option<<Context as HasContext>::Sampler>
unsafe fn get_parameter_texture( &self, parameter: u32, ) -> Option<<Context as HasContext>::Texture>
unsafe fn get_parameter_transform_feedback( &self, parameter: u32, ) -> Option<<Context as HasContext>::TransformFeedback>
unsafe fn get_parameter_vertex_array( &self, parameter: u32, ) -> Option<<Context as HasContext>::VertexArray>
unsafe fn get_renderbuffer_parameter_i32( &self, target: u32, parameter: u32, ) -> i32
unsafe fn get_framebuffer_parameter_i32( &self, target: u32, parameter: u32, ) -> i32
unsafe fn get_named_framebuffer_parameter_i32( &self, framebuffer: Option<<Context as HasContext>::Framebuffer>, parameter: u32, ) -> i32
unsafe fn get_framebuffer_attachment_parameter_i32( &self, target: u32, attachment: u32, parameter: u32, ) -> i32
unsafe fn get_named_framebuffer_attachment_parameter_i32( &self, framebuffer: Option<<Context as HasContext>::Framebuffer>, attachment: u32, parameter: u32, ) -> i32
unsafe fn get_uniform_location( &self, program: <Context as HasContext>::Program, name: &str, ) -> Option<<Context as HasContext>::UniformLocation>
unsafe fn get_attrib_location( &self, program: <Context as HasContext>::Program, name: &str, ) -> Option<u32>
unsafe fn bind_attrib_location( &self, program: <Context as HasContext>::Program, index: u32, name: &str, )
unsafe fn get_active_attributes( &self, program: <Context as HasContext>::Program, ) -> u32
unsafe fn get_active_attribute( &self, program: <Context as HasContext>::Program, index: u32, ) -> Option<ActiveAttribute>
unsafe fn get_sync_status(&self, fence: <Context as HasContext>::Fence) -> u32
unsafe fn is_sync(&self, fence: <Context as HasContext>::Fence) -> bool
unsafe fn renderbuffer_storage( &self, target: u32, internal_format: u32, width: i32, height: i32, )
unsafe fn renderbuffer_storage_multisample( &self, target: u32, samples: i32, internal_format: u32, width: i32, height: i32, )
unsafe fn sampler_parameter_f32( &self, sampler: <Context as HasContext>::Sampler, name: u32, value: f32, )
unsafe fn sampler_parameter_f32_slice( &self, sampler: <Context as HasContext>::Sampler, name: u32, value: &[f32], )
unsafe fn sampler_parameter_i32( &self, sampler: <Context as HasContext>::Sampler, name: u32, value: i32, )
unsafe fn get_sampler_parameter_i32( &self, sampler: <Context as HasContext>::Sampler, name: u32, ) -> i32
unsafe fn get_sampler_parameter_f32( &self, sampler: <Context as HasContext>::Sampler, name: u32, ) -> f32
unsafe fn generate_mipmap(&self, target: u32)
unsafe fn generate_texture_mipmap( &self, texture: <Context as HasContext>::Texture, )
unsafe fn tex_image_1d( &self, target: u32, level: i32, internal_format: i32, width: i32, border: i32, format: u32, ty: u32, pixels: PixelUnpackData<'_>, )
unsafe fn compressed_tex_image_1d( &self, target: u32, level: i32, internal_format: i32, width: i32, border: i32, image_size: i32, pixels: &[u8], )
unsafe fn tex_image_2d( &self, target: u32, level: i32, internal_format: i32, width: i32, height: i32, border: i32, format: u32, ty: u32, pixels: PixelUnpackData<'_>, )
unsafe fn tex_image_2d_multisample( &self, target: u32, samples: i32, internal_format: i32, width: i32, height: i32, fixed_sample_locations: bool, )
unsafe fn compressed_tex_image_2d( &self, target: u32, level: i32, internal_format: i32, width: i32, height: i32, border: i32, image_size: i32, pixels: &[u8], )
unsafe fn tex_image_3d( &self, target: u32, level: i32, internal_format: i32, width: i32, height: i32, depth: i32, border: i32, format: u32, ty: u32, pixels: PixelUnpackData<'_>, )
unsafe fn compressed_tex_image_3d( &self, target: u32, level: i32, internal_format: i32, width: i32, height: i32, depth: i32, border: i32, image_size: i32, pixels: &[u8], )
unsafe fn tex_storage_1d( &self, target: u32, levels: i32, internal_format: u32, width: i32, )
unsafe fn tex_storage_2d( &self, target: u32, levels: i32, internal_format: u32, width: i32, height: i32, )
unsafe fn texture_storage_2d( &self, texture: <Context as HasContext>::Texture, levels: i32, internal_format: u32, width: i32, height: i32, )
unsafe fn tex_storage_2d_multisample( &self, target: u32, samples: i32, internal_format: u32, width: i32, height: i32, fixed_sample_locations: bool, )
unsafe fn tex_storage_3d( &self, target: u32, levels: i32, internal_format: u32, width: i32, height: i32, depth: i32, )
unsafe fn texture_storage_3d( &self, texture: <Context as HasContext>::Texture, levels: i32, internal_format: u32, width: i32, height: i32, depth: i32, )
unsafe fn get_uniform_i32( &self, program: <Context as HasContext>::Program, location: &<Context as HasContext>::UniformLocation, v: &mut [i32], )
unsafe fn get_uniform_u32( &self, program: <Context as HasContext>::Program, location: &<Context as HasContext>::UniformLocation, v: &mut [u32], )
unsafe fn get_uniform_f32( &self, program: <Context as HasContext>::Program, location: &<Context as HasContext>::UniformLocation, v: &mut [f32], )
unsafe fn uniform_1_i32( &self, location: Option<&<Context as HasContext>::UniformLocation>, x: i32, )
unsafe fn uniform_2_i32( &self, location: Option<&<Context as HasContext>::UniformLocation>, x: i32, y: i32, )
unsafe fn uniform_3_i32( &self, location: Option<&<Context as HasContext>::UniformLocation>, x: i32, y: i32, z: i32, )
unsafe fn uniform_4_i32( &self, location: Option<&<Context as HasContext>::UniformLocation>, x: i32, y: i32, z: i32, w: i32, )
unsafe fn uniform_1_i32_slice( &self, location: Option<&<Context as HasContext>::UniformLocation>, v: &[i32], )
unsafe fn uniform_2_i32_slice( &self, location: Option<&<Context as HasContext>::UniformLocation>, v: &[i32], )
unsafe fn uniform_3_i32_slice( &self, location: Option<&<Context as HasContext>::UniformLocation>, v: &[i32], )
unsafe fn uniform_4_i32_slice( &self, location: Option<&<Context as HasContext>::UniformLocation>, v: &[i32], )
unsafe fn uniform_1_u32( &self, location: Option<&<Context as HasContext>::UniformLocation>, x: u32, )
unsafe fn uniform_2_u32( &self, location: Option<&<Context as HasContext>::UniformLocation>, x: u32, y: u32, )
unsafe fn uniform_3_u32( &self, location: Option<&<Context as HasContext>::UniformLocation>, x: u32, y: u32, z: u32, )
unsafe fn uniform_4_u32( &self, location: Option<&<Context as HasContext>::UniformLocation>, x: u32, y: u32, z: u32, w: u32, )
unsafe fn uniform_1_u32_slice( &self, location: Option<&<Context as HasContext>::UniformLocation>, v: &[u32], )
unsafe fn uniform_2_u32_slice( &self, location: Option<&<Context as HasContext>::UniformLocation>, v: &[u32], )
unsafe fn uniform_3_u32_slice( &self, location: Option<&<Context as HasContext>::UniformLocation>, v: &[u32], )
unsafe fn uniform_4_u32_slice( &self, location: Option<&<Context as HasContext>::UniformLocation>, v: &[u32], )
unsafe fn uniform_1_f32( &self, location: Option<&<Context as HasContext>::UniformLocation>, x: f32, )
unsafe fn uniform_2_f32( &self, location: Option<&<Context as HasContext>::UniformLocation>, x: f32, y: f32, )
unsafe fn uniform_3_f32( &self, location: Option<&<Context as HasContext>::UniformLocation>, x: f32, y: f32, z: f32, )
unsafe fn uniform_4_f32( &self, location: Option<&<Context as HasContext>::UniformLocation>, x: f32, y: f32, z: f32, w: f32, )
unsafe fn uniform_1_f32_slice( &self, location: Option<&<Context as HasContext>::UniformLocation>, v: &[f32], )
unsafe fn uniform_2_f32_slice( &self, location: Option<&<Context as HasContext>::UniformLocation>, v: &[f32], )
unsafe fn uniform_3_f32_slice( &self, location: Option<&<Context as HasContext>::UniformLocation>, v: &[f32], )
unsafe fn uniform_4_f32_slice( &self, location: Option<&<Context as HasContext>::UniformLocation>, v: &[f32], )
unsafe fn uniform_matrix_2_f32_slice( &self, location: Option<&<Context as HasContext>::UniformLocation>, transpose: bool, v: &[f32], )
unsafe fn uniform_matrix_2x3_f32_slice( &self, location: Option<&<Context as HasContext>::UniformLocation>, transpose: bool, v: &[f32], )
unsafe fn uniform_matrix_2x4_f32_slice( &self, location: Option<&<Context as HasContext>::UniformLocation>, transpose: bool, v: &[f32], )
unsafe fn uniform_matrix_3x2_f32_slice( &self, location: Option<&<Context as HasContext>::UniformLocation>, transpose: bool, v: &[f32], )
unsafe fn uniform_matrix_3_f32_slice( &self, location: Option<&<Context as HasContext>::UniformLocation>, transpose: bool, v: &[f32], )
unsafe fn uniform_matrix_3x4_f32_slice( &self, location: Option<&<Context as HasContext>::UniformLocation>, transpose: bool, v: &[f32], )
unsafe fn uniform_matrix_4x2_f32_slice( &self, location: Option<&<Context as HasContext>::UniformLocation>, transpose: bool, v: &[f32], )
unsafe fn uniform_matrix_4x3_f32_slice( &self, location: Option<&<Context as HasContext>::UniformLocation>, transpose: bool, v: &[f32], )
unsafe fn uniform_matrix_4_f32_slice( &self, location: Option<&<Context as HasContext>::UniformLocation>, transpose: bool, v: &[f32], )
unsafe fn unmap_buffer(&self, target: u32)
unsafe fn cull_face(&self, value: u32)
unsafe fn color_mask(&self, red: bool, green: bool, blue: bool, alpha: bool)
unsafe fn color_mask_draw_buffer( &self, draw_buffer: u32, red: bool, green: bool, blue: bool, alpha: bool, )
unsafe fn depth_mask(&self, value: bool)
unsafe fn blend_color(&self, red: f32, green: f32, blue: f32, alpha: f32)
unsafe fn line_width(&self, width: f32)
unsafe fn map_buffer_range( &self, target: u32, offset: i32, length: i32, access: u32, ) -> *mut u8
unsafe fn flush_mapped_buffer_range( &self, target: u32, offset: i32, length: i32, )
unsafe fn invalidate_buffer_sub_data( &self, target: u32, offset: i32, length: i32, )
unsafe fn invalidate_framebuffer(&self, target: u32, attachments: &[u32])
unsafe fn invalidate_sub_framebuffer( &self, target: u32, attachments: &[u32], x: i32, y: i32, width: i32, height: i32, )
unsafe fn polygon_offset(&self, factor: f32, units: f32)
unsafe fn polygon_mode(&self, face: u32, mode: u32)
unsafe fn finish(&self)
unsafe fn bind_texture( &self, target: u32, texture: Option<<Context as HasContext>::Texture>, )
unsafe fn bind_texture_unit( &self, unit: u32, texture: Option<<Context as HasContext>::Texture>, )
unsafe fn bind_sampler( &self, unit: u32, sampler: Option<<Context as HasContext>::Sampler>, )
unsafe fn active_texture(&self, unit: u32)
unsafe fn fence_sync( &self, condition: u32, flags: u32, ) -> Result<<Context as HasContext>::Fence, String>
unsafe fn tex_parameter_f32(&self, target: u32, parameter: u32, value: f32)
unsafe fn tex_parameter_i32(&self, target: u32, parameter: u32, value: i32)
unsafe fn texture_parameter_i32( &self, texture: <Context as HasContext>::Texture, parameter: u32, value: i32, )
unsafe fn tex_parameter_f32_slice( &self, target: u32, parameter: u32, values: &[f32], )
unsafe fn tex_parameter_i32_slice( &self, target: u32, parameter: u32, values: &[i32], )
unsafe fn tex_sub_image_2d( &self, target: u32, level: i32, x_offset: i32, y_offset: i32, width: i32, height: i32, format: u32, ty: u32, pixels: PixelUnpackData<'_>, )
unsafe fn texture_sub_image_2d( &self, texture: <Context as HasContext>::Texture, level: i32, x_offset: i32, y_offset: i32, width: i32, height: i32, format: u32, ty: u32, pixels: PixelUnpackData<'_>, )
unsafe fn compressed_tex_sub_image_2d( &self, target: u32, level: i32, x_offset: i32, y_offset: i32, width: i32, height: i32, format: u32, pixels: CompressedPixelUnpackData<'_>, )
unsafe fn tex_sub_image_3d( &self, target: u32, level: i32, x_offset: i32, y_offset: i32, z_offset: i32, width: i32, height: i32, depth: i32, format: u32, ty: u32, pixels: PixelUnpackData<'_>, )
unsafe fn texture_sub_image_3d( &self, texture: <Context as HasContext>::Texture, level: i32, x_offset: i32, y_offset: i32, z_offset: i32, width: i32, height: i32, depth: i32, format: u32, ty: u32, pixels: PixelUnpackData<'_>, )
unsafe fn compressed_tex_sub_image_3d( &self, target: u32, level: i32, x_offset: i32, y_offset: i32, z_offset: i32, width: i32, height: i32, depth: i32, format: u32, pixels: CompressedPixelUnpackData<'_>, )
unsafe fn depth_func(&self, func: u32)
unsafe fn depth_range_f32(&self, near: f32, far: f32)
unsafe fn depth_range_f64(&self, near: f64, far: f64)
unsafe fn depth_range(&self, near: f64, far: f64)
unsafe fn depth_range_f64_slice( &self, first: u32, count: i32, values: &[[f64; 2]], )
unsafe fn scissor(&self, x: i32, y: i32, width: i32, height: i32)
unsafe fn scissor_slice(&self, first: u32, count: i32, scissors: &[[i32; 4]])
unsafe fn vertex_array_attrib_binding_f32( &self, vao: <Context as HasContext>::VertexArray, index: u32, binding_index: u32, )
unsafe fn vertex_array_attrib_format_f32( &self, vao: <Context as HasContext>::VertexArray, index: u32, size: i32, data_type: u32, normalized: bool, relative_offset: u32, )
unsafe fn vertex_array_attrib_format_i32( &self, vao: <Context as HasContext>::VertexArray, index: u32, size: i32, data_type: u32, relative_offset: u32, )
unsafe fn vertex_array_attrib_format_f64( &self, vao: <Context as HasContext>::VertexArray, index: u32, size: i32, data_type: u32, relative_offset: u32, )
unsafe fn vertex_array_element_buffer( &self, vao: <Context as HasContext>::VertexArray, buffer: Option<<Context as HasContext>::Buffer>, )
unsafe fn vertex_array_vertex_buffer( &self, vao: <Context as HasContext>::VertexArray, binding_index: u32, buffer: Option<<Context as HasContext>::Buffer>, offset: i32, stride: i32, )
unsafe fn vertex_attrib_divisor(&self, index: u32, divisor: u32)
unsafe fn get_vertex_attrib_parameter_f32_slice( &self, index: u32, pname: u32, result: &mut [f32], )
unsafe fn vertex_attrib_pointer_f32( &self, index: u32, size: i32, data_type: u32, normalized: bool, stride: i32, offset: i32, )
unsafe fn vertex_attrib_pointer_i32( &self, index: u32, size: i32, data_type: u32, stride: i32, offset: i32, )
unsafe fn vertex_attrib_pointer_f64( &self, index: u32, size: i32, data_type: u32, stride: i32, offset: i32, )
unsafe fn vertex_attrib_format_f32( &self, index: u32, size: i32, data_type: u32, normalized: bool, relative_offset: u32, )
unsafe fn vertex_attrib_format_i32( &self, index: u32, size: i32, data_type: u32, relative_offset: u32, )
unsafe fn vertex_attrib_format_f64( &self, index: u32, size: i32, data_type: u32, relative_offset: u32, )
unsafe fn vertex_attrib_1_f32(&self, index: u32, x: f32)
unsafe fn vertex_attrib_2_f32(&self, index: u32, x: f32, y: f32)
unsafe fn vertex_attrib_3_f32(&self, index: u32, x: f32, y: f32, z: f32)
unsafe fn vertex_attrib_4_f32(&self, index: u32, x: f32, y: f32, z: f32, w: f32)
unsafe fn vertex_attrib_4_i32(&self, index: u32, x: i32, y: i32, z: i32, w: i32)
unsafe fn vertex_attrib_4_u32(&self, index: u32, x: u32, y: u32, z: u32, w: u32)
unsafe fn vertex_attrib_1_f32_slice(&self, index: u32, v: &[f32])
unsafe fn vertex_attrib_2_f32_slice(&self, index: u32, v: &[f32])
unsafe fn vertex_attrib_3_f32_slice(&self, index: u32, v: &[f32])
unsafe fn vertex_attrib_4_f32_slice(&self, index: u32, v: &[f32])
unsafe fn vertex_attrib_binding(&self, attrib_index: u32, binding_index: u32)
unsafe fn vertex_binding_divisor(&self, binding_index: u32, divisor: u32)
unsafe fn viewport(&self, x: i32, y: i32, width: i32, height: i32)
unsafe fn viewport_f32_slice(&self, first: u32, count: i32, values: &[[f32; 4]])
unsafe fn blend_equation(&self, mode: u32)
unsafe fn blend_equation_draw_buffer(&self, draw_buffer: u32, mode: u32)
unsafe fn blend_equation_separate(&self, mode_rgb: u32, mode_alpha: u32)
unsafe fn blend_equation_separate_draw_buffer( &self, draw_buffer: u32, mode_rgb: u32, mode_alpha: u32, )
unsafe fn blend_func(&self, src: u32, dst: u32)
unsafe fn blend_func_draw_buffer(&self, draw_buffer: u32, src: u32, dst: u32)
unsafe fn blend_func_separate( &self, src_rgb: u32, dst_rgb: u32, src_alpha: u32, dst_alpha: u32, )
unsafe fn blend_func_separate_draw_buffer( &self, draw_buffer: u32, src_rgb: u32, dst_rgb: u32, src_alpha: u32, dst_alpha: u32, )
unsafe fn stencil_func(&self, func: u32, reference: i32, mask: u32)
unsafe fn stencil_func_separate( &self, face: u32, func: u32, reference: i32, mask: u32, )
unsafe fn stencil_mask(&self, mask: u32)
unsafe fn stencil_mask_separate(&self, face: u32, mask: u32)
unsafe fn stencil_op(&self, stencil_fail: u32, depth_fail: u32, pass: u32)
unsafe fn stencil_op_separate( &self, face: u32, stencil_fail: u32, depth_fail: u32, pass: u32, )
unsafe fn debug_message_control( &self, source: u32, msg_type: u32, severity: u32, ids: &[u32], enabled: bool, )
unsafe fn debug_message_insert<S>( &self, source: u32, msg_type: u32, id: u32, severity: u32, msg: S, )
unsafe fn debug_message_callback<F>(&mut self, callback: F)
unsafe fn get_debug_message_log(&self, count: u32) -> Vec<DebugMessageLogEntry>
unsafe fn push_debug_group<S>(&self, source: u32, id: u32, message: S)
unsafe fn pop_debug_group(&self)
unsafe fn object_label<S>(&self, identifier: u32, name: u32, label: Option<S>)
unsafe fn get_object_label(&self, identifier: u32, name: u32) -> String
unsafe fn object_ptr_label<S>( &self, sync: <Context as HasContext>::Fence, label: Option<S>, )
unsafe fn get_object_ptr_label( &self, sync: <Context as HasContext>::Fence, ) -> String
unsafe fn get_uniform_block_index( &self, program: <Context as HasContext>::Program, name: &str, ) -> Option<u32>
unsafe fn get_uniform_indices( &self, program: <Context as HasContext>::Program, names: &[&str], ) -> Vec<Option<u32>>
unsafe fn uniform_block_binding( &self, program: <Context as HasContext>::Program, index: u32, binding: u32, )
unsafe fn get_shader_storage_block_index( &self, program: <Context as HasContext>::Program, name: &str, ) -> Option<u32>
unsafe fn shader_storage_block_binding( &self, program: <Context as HasContext>::Program, index: u32, binding: u32, )
unsafe fn read_buffer(&self, src: u32)
unsafe fn named_framebuffer_read_buffer( &self, framebuffer: Option<<Context as HasContext>::Framebuffer>, src: u32, )
unsafe fn read_pixels( &self, x: i32, y: i32, width: i32, height: i32, format: u32, gltype: u32, pixels: PixelPackData<'_>, )
unsafe fn begin_query(&self, target: u32, query: <Context as HasContext>::Query)
unsafe fn end_query(&self, target: u32)
unsafe fn query_counter( &self, query: <Context as HasContext>::Query, target: u32, )
unsafe fn get_query_parameter_u32( &self, query: <Context as HasContext>::Query, parameter: u32, ) -> u32
unsafe fn get_query_parameter_u64_with_offset( &self, query: <Context as HasContext>::Query, parameter: u32, offset: usize, )
unsafe fn create_transform_feedback( &self, ) -> Result<<Context as HasContext>::TransformFeedback, String>
unsafe fn is_transform_feedback( &self, transform_feedback: <Context as HasContext>::TransformFeedback, ) -> bool
unsafe fn delete_transform_feedback( &self, transform_feedback: <Context as HasContext>::TransformFeedback, )
unsafe fn bind_transform_feedback( &self, target: u32, transform_feedback: Option<<Context as HasContext>::TransformFeedback>, )
unsafe fn begin_transform_feedback(&self, primitive_mode: u32)
unsafe fn end_transform_feedback(&self)
unsafe fn pause_transform_feedback(&self)
unsafe fn resume_transform_feedback(&self)
unsafe fn transform_feedback_varyings( &self, program: <Context as HasContext>::Program, varyings: &[&str], buffer_mode: u32, )
unsafe fn get_transform_feedback_varying( &self, program: <Context as HasContext>::Program, index: u32, ) -> Option<ActiveTransformFeedback>
unsafe fn memory_barrier(&self, barriers: u32)
unsafe fn memory_barrier_by_region(&self, barriers: u32)
unsafe fn bind_image_texture( &self, unit: u32, texture: Option<<Context as HasContext>::Texture>, level: i32, layered: bool, layer: i32, access: u32, format: u32, )
unsafe fn get_active_uniform_block_parameter_i32( &self, program: <Context as HasContext>::Program, uniform_block_index: u32, parameter: u32, ) -> i32
unsafe fn get_active_uniform_block_parameter_i32_slice( &self, program: <Context as HasContext>::Program, uniform_block_index: u32, parameter: u32, out: &mut [i32], )
unsafe fn get_active_uniform_block_name( &self, program: <Context as HasContext>::Program, uniform_block_index: u32, ) -> String
unsafe fn max_shader_compiler_threads(&self, count: u32)
unsafe fn hint(&self, target: u32, mode: u32)
unsafe fn sample_coverage(&self, value: f32, invert: bool)
unsafe fn get_internal_format_i32_slice( &self, target: u32, internal_format: u32, pname: u32, result: &mut [i32], )
Auto Trait Implementations§
impl !Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
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
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more