Struct Device

Source
pub struct Device { /* private fields */ }
Expand description

A logical device.

§Destruction

Dropping this Device will cause Instance::destroy_device to be called, automatically releasing any resources associated with it.

Implementations§

Source§

impl Device

Source

pub fn builder<'db>() -> DeviceBuilder<'db>

Returns a new DeviceBuilder.

Source

pub fn queue(&self, device_queue_index: usize) -> Option<&Queue>

Returns one of this device’s associated queue.

device_queue_index does not correspond to the queue family index or any other index used when creating this device.

Source

pub fn queues(&self) -> &[Queue]

Returns a list of all queues associated with this device.

Source

pub fn proc_addr_loader(&self) -> &DeviceProcAddrLoader

Returns a reference to the associated DeviceProcAddrLoader

Source

pub fn handle(&self) -> DeviceHandle

Returns the handle for this device.

Source

pub fn physical_device(&self) -> &PhysicalDevice

Returns a reference to the associated physical device.

Source

pub fn instance(&self) -> &Instance

Returns a reference to the associated instance.

Source

pub fn wait_idle(&self)

Waits for this device to become idle.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDeviceWaitIdle.html

Source

pub fn memory_type_index( &self, type_filter: u32, properties: MemoryPropertyFlags, ) -> VdResult<u32>

Returns the memory type index on this device matching the provided type filter and properties.

Source

pub fn get_device_queue( &self, queue_family_index: u32, queue_index: u32, ) -> Option<QueueHandle>

Get a queue handle from a device.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetDeviceQueue.html

Source

pub unsafe fn queue_submit<Q>( &self, queue: Q, submit_info: &[SubmitInfo<'_>], fence: Option<FenceHandle>, ) -> VdResult<()>
where Q: Handle<Target = QueueHandle>,

Submits a sequence of semaphores or command buffers to a queue.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkQueueSubmit.html

Source

pub fn queue_wait_idle<Q>(&self, queue: Q)
where Q: Handle<Target = QueueHandle>,

Waits for a queue to become idle.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkQueueWaitIdle.html

Source

pub fn device_wait_idle(&self)

Waits for this device to become idle.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDeviceWaitIdle.html

Source

pub unsafe fn allocate_memory( &self, allocate_info: &MemoryAllocateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<DeviceMemoryHandle>

Allocates GPU memory.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkAllocateMemory.html

Source

pub unsafe fn free_memory( &self, memory: DeviceMemoryHandle, allocator: Option<*const VkAllocationCallbacks>, )

Frees GPU memory.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkFreeMemory.html

Source

pub unsafe fn map_memory<T>( &self, memory: DeviceMemoryHandle, offset_bytes: u64, size_bytes: u64, flags: MemoryMapFlags, ) -> VdResult<*mut T>

Maps a memory object into application address space.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkMapMemory.html

Source

pub unsafe fn unmap_memory(&self, memory: DeviceMemoryHandle)

Unmaps a previously mapped memory object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkUnmapMemory.html

Source

pub unsafe fn flush_mapped_memory_ranges( &self, memory_ranges: &[MappedMemoryRange<'_>], ) -> VdResult<()>

Flushes mapped memory ranges.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkFlushMappedMemoryRanges.html

Source

pub unsafe fn invalidate_mapped_memory_ranges( &self, memory_ranges: &[MappedMemoryRange<'_>], ) -> VdResult<()>

Invalidates ranges of mapped memory objects.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkInvalidateMappedMemoryRanges.html

Source

pub unsafe fn get_device_memory_commitment<Dm>(&self, memory: Dm) -> DeviceSize
where Dm: Handle<Target = DeviceMemoryHandle>,

Queries the current commitment for a VkDeviceMemory.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetDeviceMemoryCommitment.html

Source

pub unsafe fn bind_buffer_memory( &self, buffer: BufferHandle, memory: DeviceMemoryHandle, memory_offset: DeviceSize, ) -> VdResult<()>

Binds device memory to a buffer object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkBindBufferMemory.html

Source

pub unsafe fn bind_image_memory( &self, image: ImageHandle, memory: DeviceMemoryHandle, memory_offset: DeviceSize, ) -> VdResult<()>

Binds device memory to an image object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkBindImageMemory.html

Source

pub unsafe fn get_buffer_memory_requirements( &self, buffer: BufferHandle, ) -> MemoryRequirements

Returns the memory requirements for specified Vulkan object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetBufferMemoryRequirements.html

Source

pub unsafe fn get_image_memory_requirements<I>( &self, image: I, ) -> MemoryRequirements
where I: Handle<Target = ImageHandle>,

Returns the memory requirements for specified Vulkan object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetImageMemoryRequirements.html

Source

pub unsafe fn get_image_sparse_memory_requirements<I>( &self, image: I, ) -> SmallVec<[SparseImageMemoryRequirements; 32]>
where I: Handle<Target = ImageHandle>,

Queries the memory requirements for a sparse image.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetImageSparseMemoryRequirements.html

Source

pub unsafe fn queue_bind_sparse<Q, F>( &self, queue: Q, bind_info: &[BindSparseInfo<'_>], fence: F, ) -> VdResult<()>
where Q: Handle<Target = QueueHandle>, F: Handle<Target = FenceHandle>,

Binds device memory to a sparse resource object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkQueueBindSparse.html

Source

pub unsafe fn create_fence( &self, create_info: &FenceCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<FenceHandle>

Creates a new fence object

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateFence.html

Source

pub unsafe fn destroy_fence( &self, fence: FenceHandle, allocator: Option<*const VkAllocationCallbacks>, )

Destroys a fence object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyFence.html

Source

pub unsafe fn reset_fences(&self, fences: &[FenceHandle]) -> VdResult<()>

Resets one or more fence objects.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkResetFences.html

Source

pub unsafe fn get_fence_status<F>(&self, fence: F) -> VdResult<CallResult>
where F: Handle<Target = FenceHandle>,

Returns the status of a fence.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetFenceStatus.html

Source

pub unsafe fn wait_for_fences( &self, fences: &[FenceHandle], wait_all: bool, timeout: u64, ) -> VdResult<()>

Waits for one or more fences to become signaled.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkWaitForFences.html

Source

pub unsafe fn create_semaphore( &self, create_info: &SemaphoreCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<SemaphoreHandle>

Creates a new queue semaphore object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateSemaphore.html

Source

pub unsafe fn destroy_semaphore( &self, shader_module: SemaphoreHandle, allocator: Option<*const VkAllocationCallbacks>, )

Destroys a semaphore object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroySemaphore.html

Source

pub unsafe fn create_event( &self, create_info: &EventCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<EventHandle>

Creates a new event object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateEvent.html

Source

pub unsafe fn destroy_event( &self, event: EventHandle, allocator: Option<*const VkAllocationCallbacks>, )

Destroys an event object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyEvent.html

Source

pub unsafe fn get_event_status<E>(&self, event: E) -> VdResult<CallResult>
where E: Handle<Target = EventHandle>,

Retrieves the status of an event object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetEventStatus.html

Source

pub unsafe fn set_event<E>(&self, event: E) -> VdResult<()>
where E: Handle<Target = EventHandle>,

Sets an event to signaled state.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkSetEvent.html

Source

pub unsafe fn reset_event<E>(&self, event: E) -> VdResult<()>
where E: Handle<Target = EventHandle>,

Resets an event to non-signaled state.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkResetEvent.html

Source

pub unsafe fn create_query_pool( &self, create_info: &QueryPoolCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<QueryPoolHandle>

Creates a new query pool object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateQueryPool.html

Source

pub unsafe fn destroy_query_pool( &self, query_pool: QueryPoolHandle, allocator: Option<*const VkAllocationCallbacks>, )

Destroys a query pool object

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyQueryPool.html

Source

pub unsafe fn get_query_pool_results<Q>( &self, query_pool: Q, first_query: u32, query_count: u32, data_size: usize, data: *mut c_void, stride: DeviceSize, flags: QueryResultFlags, ) -> VdResult<()>
where Q: Handle<Target = QueryPoolHandle>,

Copies results of queries in a query pool to a host memory region

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetQueryPoolResults.html

Source

pub unsafe fn create_buffer( &self, create_info: &BufferCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<BufferHandle>

Creates a new buffer object

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateBuffer.html

Source

pub unsafe fn destroy_buffer( &self, buffer: BufferHandle, allocator: Option<*const VkAllocationCallbacks>, )

Destroys a buffer object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyBuffer.html

Source

pub unsafe fn create_buffer_view( &self, create_info: &BufferViewCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<BufferViewHandle>

Creates a new buffer view object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateBufferView.html

Source

pub unsafe fn destroy_buffer_view( &self, buffer_view: BufferViewHandle, allocator: Option<*const VkAllocationCallbacks>, )

Destroys a buffer view object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyBufferView.html

Source

pub unsafe fn create_image( &self, create_info: &ImageCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<ImageHandle>

Creates a new image object

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateImage.html

Source

pub unsafe fn destroy_image( &self, image: ImageHandle, allocator: Option<*const VkAllocationCallbacks>, )

Destroys an image object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyImage.html

Source

pub unsafe fn get_image_subresource_layout<I>( &self, image: I, subresource: &ImageSubresource, ) -> SubresourceLayout
where I: Handle<Target = ImageHandle>,

Retrieves information about an image subresource.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetImageSubresourceLayout.html

Source

pub unsafe fn create_image_view( &self, create_info: &ImageViewCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<ImageViewHandle>

Creates an image view from an existing image.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateImageView.html

Source

pub unsafe fn destroy_image_view( &self, image_view: ImageViewHandle, allocator: Option<*const VkAllocationCallbacks>, )

Destroys an image view object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyImageView.html

Source

pub unsafe fn create_shader_module( &self, create_info: &ShaderModuleCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<ShaderModuleHandle>

Creates a new shader module object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateShaderModule.html

Source

pub unsafe fn destroy_shader_module( &self, shader_module: ShaderModuleHandle, allocator: Option<*const VkAllocationCallbacks>, )

Destroys a shader module module.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyShaderModule.html

Source

pub unsafe fn create_pipeline_cache( &self, create_info: &PipelineCacheCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<PipelineCacheHandle>

Creates a new pipeline cache

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreatePipelineCache.html

Source

pub unsafe fn destroy_pipeline_cache( &self, pipeline_cache: PipelineCacheHandle, allocator: Option<*const VkAllocationCallbacks>, )

Destroys a pipeline cache object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyPipelineCache.html

Source

pub unsafe fn get_pipeline_cache_data<Pc>( &self, pipeline_cache: Pc, data_size: *mut usize, data: *mut c_void, ) -> VdResult<()>
where Pc: Handle<Target = PipelineCacheHandle>,

Gets the data store from a pipeline cache.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetPipelineCacheData.html

Source

pub unsafe fn merge_pipeline_caches<Pc>( &self, dst_cache: Pc, src_caches: &[PipelineCacheHandle], ) -> VdResult<()>
where Pc: Handle<Target = PipelineCacheHandle>,

Combines the data stores of pipeline caches.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkMergePipelineCaches.html

Source

pub unsafe fn create_graphics_pipelines( &self, pipeline_cache: Option<PipelineCacheHandle>, create_infos: &[GraphicsPipelineCreateInfo<'_>], allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<SmallVec<[PipelineHandle; 4]>>

Creates graphics pipelines.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateGraphicsPipelines.html

Source

pub unsafe fn create_compute_pipelines( &self, pipeline_cache: Option<PipelineCacheHandle>, create_infos: &[ComputePipelineCreateInfo<'_>], allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<SmallVec<[PipelineHandle; 4]>>

Creates a new compute pipeline object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateComputePipelines.html

Source

pub unsafe fn destroy_pipeline( &self, pipeline: PipelineHandle, allocator: Option<*const VkAllocationCallbacks>, )

Destroys a pipeline object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyPipeline.html

Source

pub unsafe fn create_pipeline_layout( &self, create_info: &PipelineLayoutCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<PipelineLayoutHandle>

Creates a new pipeline layout object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreatePipelineLayout.html

Source

pub unsafe fn destroy_pipeline_layout( &self, pipeline_layout: PipelineLayoutHandle, allocator: Option<*const VkAllocationCallbacks>, )

Destroys a pipeline layout object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyPipelineLayout.html

Source

pub unsafe fn create_sampler( &self, create_info: &SamplerCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<SamplerHandle>

Creates a new sampler object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateSampler.html

Source

pub unsafe fn destroy_sampler( &self, sampler: SamplerHandle, allocator: Option<*const VkAllocationCallbacks>, )

Destroys a sampler object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroySampler.html

Source

pub unsafe fn create_descriptor_set_layout( &self, create_info: &DescriptorSetLayoutCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<DescriptorSetLayoutHandle>

Creates a new descriptor set layout.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateDescriptorSetLayout.html

Source

pub unsafe fn destroy_descriptor_set_layout( &self, descriptor_set_layout: DescriptorSetLayoutHandle, allocator: Option<*const VkAllocationCallbacks>, )

Destroys a descriptor set layout object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyDescriptorSetLayout.html

Source

pub unsafe fn create_descriptor_pool( &self, create_info: &DescriptorPoolCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<DescriptorPoolHandle>

Creates a descriptor pool object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateDescriptorPool.html

Source

pub unsafe fn destroy_descriptor_pool( &self, descriptor_pool: DescriptorPoolHandle, allocator: Option<*const VkAllocationCallbacks>, )

Destroys a descriptor pool object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyDescriptorPool.html

Source

pub unsafe fn reset_descriptor_pool<Dp>( &self, descriptor_pool: Dp, flags: DescriptorPoolResetFlags, ) -> VdResult<()>
where Dp: Handle<Target = DescriptorPoolHandle>,

Resets a descriptor pool object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkResetDescriptorPool.html

Source

pub unsafe fn allocate_descriptor_sets( &self, allocate_info: &DescriptorSetAllocateInfo<'_>, ) -> VdResult<SmallVec<[DescriptorSetHandle; 8]>>

Allocates one or more descriptor sets.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkAllocateDescriptorSets.html

Source

pub unsafe fn free_descriptor_sets<Dp>( &self, descriptor_pool: Dp, descriptor_sets: &[DescriptorSetHandle], ) -> VdResult<()>
where Dp: Handle<Target = DescriptorPoolHandle>,

Frees one or more descriptor sets.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkFreeDescriptorSets.html

Source

pub fn update_descriptor_sets( &self, descriptor_writes: &[WriteDescriptorSet<'_>], descriptor_copies: &[CopyDescriptorSet<'_>], )

Updates the contents of a descriptor set object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkUpdateDescriptorSets.html

Source

pub unsafe fn create_framebuffer( &self, create_info: &FramebufferCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<FramebufferHandle>

Creates a new framebuffer object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateFramebuffer.html

Source

pub unsafe fn destroy_framebuffer( &self, framebuffer: FramebufferHandle, allocator: Option<*const VkAllocationCallbacks>, )

Destroys a framebuffer object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyFramebuffer.html

Source

pub unsafe fn create_render_pass( &self, create_info: &RenderPassCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<RenderPassHandle>

Creates a new render pass object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateRenderPass.html

Source

pub unsafe fn destroy_render_pass( &self, render_pass: RenderPassHandle, allocator: Option<*const VkAllocationCallbacks>, )

Destroys a render pass object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyRenderPass.html

Source

pub unsafe fn get_render_area_granularity<Rp>( &self, render_pass: Rp, ) -> Extent2d
where Rp: Handle<Target = RenderPassHandle>,

Returns the granularity for optimal render area.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetRenderAreaGranularity.html

Source

pub unsafe fn create_command_pool( &self, create_info: &CommandPoolCreateInfo<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<CommandPoolHandle>

Creates a new command pool object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateCommandPool.html

Source

pub unsafe fn destroy_command_pool( &self, command_pool: CommandPoolHandle, allocator: Option<*const VkAllocationCallbacks>, )

Destroys a command pool object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkDestroyCommandPool.html

Source

pub unsafe fn reset_command_pool<Cp>( &self, command_pool: Cp, flags: CommandPoolResetFlags, ) -> VdResult<()>
where Cp: Handle<Target = CommandPoolHandle>,

Resets a command pool.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkResetCommandPool.html

Source

pub unsafe fn allocate_command_buffers( &self, allocate_info: &CommandBufferAllocateInfo<'_>, ) -> VdResult<SmallVec<[CommandBufferHandle; 16]>>

Allocates command buffers from an existing command pool.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkAllocateCommandBuffers.html

Source

pub unsafe fn free_command_buffers<Cp>( &self, command_pool: Cp, command_buffers: &[CommandBufferHandle], )
where Cp: Handle<Target = CommandPoolHandle>,

Frees command buffers.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkFreeCommandBuffers.html

Source

pub unsafe fn begin_command_buffer( &self, command_buffer: CommandBufferHandle, begin_info: &CommandBufferBeginInfo<'_>, ) -> VdResult<()>

Starts recording a command buffer.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkBeginCommandBuffer.html

Source

pub unsafe fn end_command_buffer( &self, command_buffer: CommandBufferHandle, ) -> VdResult<()>

Finishes recording a command buffer.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkEndCommandBuffer.html

Source

pub unsafe fn cmd_reset_command_buffer( &self, command_buffer: CommandBufferHandle, flags: CommandBufferResetFlags, ) -> VdResult<()>

Resets a command buffer to the initial state.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkResetCommandBuffer.html

Source

pub unsafe fn cmd_bind_pipeline( &self, command_buffer: CommandBufferHandle, pipeline_bind_point: PipelineBindPoint, pipeline: PipelineHandle, )

Binds a pipeline object to a command buffer.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdBindPipeline.html

Source

pub unsafe fn cmd_set_viewport( &self, command_buffer: CommandBufferHandle, first_viewport: u32, viewports: &[Viewport], )

Sets the viewport on a command buffer.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetViewport.html

Source

pub unsafe fn cmd_set_scissor( &self, command_buffer: CommandBufferHandle, first_scissor: u32, scissors: &[Rect2d], )

Sets the dynamic scissor rectangles on a command buffer.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetScissor.html

Source

pub unsafe fn cmd_set_line_width( &self, command_buffer: CommandBufferHandle, line_width: f32, )

Sets the dynamic line width state.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetLineWidth.html

Source

pub unsafe fn cmd_set_depth_bias( &self, command_buffer: CommandBufferHandle, depth_bias_constant_factor: f32, depth_bias_clamp: f32, depth_bias_slope_factor: f32, )

Sets the depth bias dynamic state.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetDepthBias.html

Source

pub unsafe fn cmd_set_blend_constants( &self, command_buffer: CommandBufferHandle, blend_constants: [f32; 4], )

Sets the values of blend constants.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetBlendConstants.html

Source

pub unsafe fn cmd_set_depth_bounds( &self, command_buffer: CommandBufferHandle, min_depth_bounds: f32, max_depth_bounds: f32, )

Sets the depth bounds test values for a command buffer.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetDepthBounds.html

Source

pub unsafe fn cmd_set_stencil_compare_mask( &self, command_buffer: CommandBufferHandle, face_mask: StencilFaceFlags, compare_mask: u32, )

Sets the stencil compare mask dynamic state.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetStencilCompareMask.html

Source

pub unsafe fn cmd_set_stencil_write_mask( &self, command_buffer: CommandBufferHandle, face_mask: StencilFaceFlags, write_mask: u32, )

Sets the stencil write mask dynamic state

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetStencilWriteMask.html

Source

pub unsafe fn cmd_set_stencil_reference( &self, command_buffer: CommandBufferHandle, face_mask: StencilFaceFlags, reference: u32, )

Sets the stencil reference dynamic state.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetStencilReference.html

Source

pub unsafe fn cmd_bind_descriptor_sets( &self, command_buffer: CommandBufferHandle, pipeline_bind_point: PipelineBindPoint, layout: PipelineLayoutHandle, first_set: u32, descriptor_sets: &[DescriptorSetHandle], dynamic_offsets: &[u32], )

Binds descriptor sets to a command buffer.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdBindDescriptorSets.html

Source

pub unsafe fn cmd_bind_index_buffer( &self, command_buffer: CommandBufferHandle, buffer: BufferHandle, offset: u64, index_type: IndexType, )

Binds an index buffer to a command buffer.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdBindIndexBuffer.html

Source

pub unsafe fn cmd_bind_vertex_buffers( &self, command_buffer: CommandBufferHandle, first_binding: u32, buffers: &[BufferHandle], offsets: &[u64], )

Binds vertex buffers to a command buffer.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdBindVertexBuffers.html

Source

pub unsafe fn cmd_draw( &self, command_buffer: CommandBufferHandle, vertex_count: u32, instance_count: u32, first_vertex: u32, first_instance: u32, )

Draws primitives.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdDraw.html

Source

pub unsafe fn cmd_draw_indexed( &self, command_buffer: CommandBufferHandle, index_count: u32, instance_count: u32, first_index: u32, vertex_offset: i32, first_instance: u32, )

Issues an indexed draw into a command buffer.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdDrawIndexed.html

Source

pub unsafe fn cmd_draw_indirect( &self, command_buffer: CommandBufferHandle, buffer: BufferHandle, offset: u64, draw_count: u32, stride: u32, )

Issues an indirect draw into a command buffer.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdDrawIndirect.html

Source

pub unsafe fn cmd_draw_indexed_indirect( &self, command_buffer: CommandBufferHandle, buffer: BufferHandle, offset: u64, draw_count: u32, stride: u32, )

Performs an indexed indirect draw.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdDrawIndexedIndirect.html

Source

pub unsafe fn cmd_dispatch( &self, command_buffer: CommandBufferHandle, group_count_x: u32, group_count_y: u32, group_count_z: u32, )

Dispatches compute work items.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdDispatch.html

Source

pub unsafe fn cmd_dispatch_indirect( &self, command_buffer: CommandBufferHandle, buffer: BufferHandle, offset: u64, )

Dispatches compute work items using indirect parameters.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdDispatchIndirect.html

Source

pub unsafe fn cmd_copy_buffer( &self, command_buffer: CommandBufferHandle, src_buffer: BufferHandle, dst_buffer: BufferHandle, regions: &[BufferCopy], )

Copies data between buffer regions.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdCopyBuffer.html

Source

pub unsafe fn cmd_copy_image( &self, command_buffer: CommandBufferHandle, src_image: ImageHandle, src_image_layout: ImageLayout, dst_image: ImageHandle, dst_image_layout: ImageLayout, regions: &[ImageCopy], )

Copies data between images.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdCopyImage.html

Source

pub unsafe fn cmd_blit_image( &self, command_buffer: CommandBufferHandle, src_image: ImageHandle, src_image_layout: ImageLayout, dst_image: ImageHandle, dst_image_layout: ImageLayout, regions: &[ImageBlit], filter: Filter, )

Copies regions of an image, potentially performing format conversion.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdBlitImage.html

Source

pub unsafe fn cmd_copy_buffer_to_image( &self, command_buffer: CommandBufferHandle, src_buffer: BufferHandle, dst_image: ImageHandle, dst_image_layout: ImageLayout, regions: &[BufferImageCopy], )

Copies data from a buffer into an image.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdCopyBufferToImage.html

Source

pub unsafe fn cmd_copy_image_to_buffer( &self, command_buffer: CommandBufferHandle, src_image: ImageHandle, src_image_layout: ImageLayout, dst_buffer: BufferHandle, regions: &[BufferImageCopy], )

Copies image data into a buffer.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdCopyImageToBuffer.html

Source

pub unsafe fn cmd_update_buffer( &self, command_buffer: CommandBufferHandle, dst_buffer: BufferHandle, dst_offset: u64, data: &[u8], )

Updates a buffer’s contents from host memory.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdUpdateBuffer.html

Source

pub unsafe fn cmd_fill_buffer( &self, command_buffer: CommandBufferHandle, dst_buffer: BufferHandle, dst_offset: u64, size: Option<DeviceSize>, data: u32, )

Fills a region of a buffer with a fixed value.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdFillBuffer.html

Source

pub unsafe fn cmd_clear_color_image( &self, command_buffer: CommandBufferHandle, image: ImageHandle, image_layout: ImageLayout, color: &ClearColorValue, ranges: &[ImageSubresourceRange], )

Clears regions of a color image.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdClearColorImage.html

Source

pub unsafe fn cmd_clear_depth_stencil_image( &self, command_buffer: CommandBufferHandle, image: ImageHandle, image_layout: ImageLayout, depth_stencil: &ClearDepthStencilValue, ranges: &[ImageSubresourceRange], )

Fills regions of a combined depth/stencil image.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdClearDepthStencilImage.html

Source

pub unsafe fn cmd_clear_attachments( &self, command_buffer: CommandBufferHandle, attachments: &[ClearAttachment], rects: &[ClearRect], )

Clears regions within currently bound framebuffer attachments.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdClearAttachments.html

Source

pub unsafe fn cmd_resolve_image( &self, command_buffer: CommandBufferHandle, src_image: ImageHandle, src_image_layout: ImageLayout, dst_image: ImageHandle, dst_image_layout: ImageLayout, regions: &[ImageResolve], )

Resolves regions of an image.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdResolveImage.html

Source

pub unsafe fn cmd_set_event( &self, command_buffer: CommandBufferHandle, event: EventHandle, stage_mask: PipelineStageFlags, )

Sets an event object to signaled state.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdSetEvent.html

Source

pub unsafe fn cmd_reset_event( &self, command_buffer: CommandBufferHandle, event: EventHandle, stage_mask: PipelineStageFlags, )

Resets an event object to non-signaled state.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdResetEvent.html

Source

pub unsafe fn cmd_wait_events( &self, command_buffer: CommandBufferHandle, events: &[EventHandle], src_stage_mask: PipelineStageFlags, dst_stage_mask: PipelineStageFlags, memory_barriers: &[MemoryBarrier<'_>], buffer_memory_barriers: &[BufferMemoryBarrier<'_>], image_memory_barriers: &[ImageMemoryBarrier<'_>], )

Waits for one or more events and insert a set of memory.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdWaitEvents.html

Source

pub unsafe fn cmd_pipeline_barrier( &self, command_buffer: CommandBufferHandle, src_stage_mask: PipelineStageFlags, dst_stage_mask: PipelineStageFlags, dependency_flags: DependencyFlags, memory_barriers: &[MemoryBarrier<'_>], buffer_memory_barriers: &[BufferMemoryBarrier<'_>], image_memory_barriers: &[ImageMemoryBarrier<'_>], )

Inserts a memory dependency.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdPipelineBarrier.html

Source

pub unsafe fn cmd_begin_query( &self, command_buffer: CommandBufferHandle, query_pool: QueryPoolHandle, query: u32, flags: QueryControlFlags, )

Begins a query.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdBeginQuery.html

Source

pub unsafe fn cmd_end_query( &self, command_buffer: CommandBufferHandle, query_pool: QueryPoolHandle, query: u32, )

Ends a query.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdEndQuery.html

Source

pub unsafe fn cmd_reset_query_pool( &self, command_buffer: CommandBufferHandle, query_pool: QueryPoolHandle, first_query: u32, query_count: u32, )

Resets queries in a query pool.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdResetQueryPool.html

Source

pub unsafe fn cmd_write_timestamp( &self, command_buffer: CommandBufferHandle, pipeline_stage: PipelineStageFlags, query_pool: QueryPoolHandle, query: u32, )

Writes a device timestamp into a query object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdWriteTimestamp.html

Source

pub unsafe fn cmd_copy_query_pool_results( &self, command_buffer: CommandBufferHandle, query_pool: QueryPoolHandle, first_query: u32, query_count: u32, dst_buffer: BufferHandle, dst_offset: u64, stride: u64, flags: QueryResultFlags, )

Copies the results of queries in a query pool to a buffer object.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdCopyQueryPoolResults.html

Source

pub unsafe fn cmd_push_constants( &self, command_buffer: CommandBufferHandle, layout: PipelineLayoutHandle, stage_flags: ShaderStageFlags, offset: u32, values: &[u8], )

Updates the values of push constants.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdPushConstants.html

Source

pub unsafe fn cmd_begin_render_pass( &self, command_buffer: CommandBufferHandle, render_pass_begin: &RenderPassBeginInfo<'_>, contents: SubpassContents, )

Begins a new render pass.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdBeginRenderPass.html

Source

pub unsafe fn cmd_next_subpass( &self, command_buffer: CommandBufferHandle, contents: SubpassContents, )

Transitions to the next subpass of a render pass.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdNextSubpass.html

Source

pub unsafe fn cmd_end_render_pass(&self, command_buffer: CommandBufferHandle)

Ends the current render pass.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdEndRenderPass.html

Source

pub unsafe fn cmd_execute_commands( &self, command_buffer: CommandBufferHandle, command_buffers: &[CommandBufferHandle], )

Executes a secondary command buffer from a primary command buffer.

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdExecuteCommands.html

Source

pub unsafe fn create_swapchain_khr( &self, create_info: &SwapchainCreateInfoKhr<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<SwapchainKhrHandle>

Creates a swapchain.

https://manned.org/vkCreateSwapchainKHR.3

Source

pub unsafe fn destroy_swapchain_khr( &mut self, swapchain: SwapchainKhrHandle, allocator: Option<*const VkAllocationCallbacks>, )

Destroys a swapchain object.

https://manned.org/vkDestroySwapchainKHR.3

Source

pub unsafe fn get_swapchain_images_khr( &self, swapchain: SwapchainKhrHandle, ) -> VdResult<SmallVec<[ImageHandle; 4]>>

Obtains the array of presentable images associated with a swapchain.

https://manned.org/vkGetSwapchainImagesKHR.3

Source

pub unsafe fn acquire_next_image_khr( &self, swapchain: SwapchainKhrHandle, timeout: u64, semaphore: Option<SemaphoreHandle>, fence: Option<FenceHandle>, ) -> VdResult<u32>

Retrieves the index of the next available presentable image.

https://manned.org/vkAcquireNextImageKHR.3

Source

pub unsafe fn queue_present_khr<Q>( &self, queue: Q, present_info: &PresentInfoKhr<'_>, ) -> VdResult<()>
where Q: Handle<Target = QueueHandle>,

Queues an image for presentation.

https://manned.org/vkQueuePresentKHR.3

Source

pub unsafe fn create_shared_swapchains_khr( &self, create_infos: &[SwapchainCreateInfoKhr<'_>], allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<SmallVec<[SwapchainKhrHandle; 4]>>

Creates multiple swapchains that share presentable images.

https://manned.org/vkCreateSharedSwapchainsKHR.3

Source

pub unsafe fn trim_command_pool_khr<P>( &self, _command_pool: P, _flags: CommandPoolTrimFlagsKhr, ) -> VdResult<()>
where P: Handle<Target = CommandPoolHandle>,

Source

pub unsafe fn get_memory_win32_handle_khr( &self, _get_win32_handle_info: &MemoryGetWin32HandleInfoKhr<'_>, ) -> VdResult<()>

Source

pub unsafe fn get_memory_win32_handle_properties_khr( &self, _handle_type: ExternalMemoryHandleTypeFlagsKhr, _handle: HANDLE, ) -> VdResult<()>

Source

pub unsafe fn get_memory_fd_khr( &self, _get_fd_info: &MemoryGetFdInfoKhr<'_>, _fd: &mut i32, ) -> VdResult<()>

Source

pub unsafe fn get_memory_fd_properties_khr( &self, _handle_type: ExternalMemoryHandleTypeFlagsKhr, _fd: i32, ) -> VdResult<()>

Source

pub unsafe fn import_semaphore_win32_handle_khr( &self, _import_semaphore_win32_handle_info: &ImportSemaphoreWin32HandleInfoKhr<'_>, ) -> VdResult<()>

Source

pub unsafe fn get_semaphore_win32_handle_khr( &self, _get_win32_handle_info: &SemaphoreGetWin32HandleInfoKhr<'_>, ) -> VdResult<()>

Source

pub unsafe fn import_semaphore_fd_khr( &self, _import_semaphore_fd_info: &ImportSemaphoreFdInfoKhr<'_>, ) -> VdResult<()>

Source

pub unsafe fn get_semaphore_fd_khr( &self, _get_fd_info: &SemaphoreGetFdInfoKhr<'_>, ) -> VdResult<()>

Source

pub unsafe fn cmd_push_descriptor_set_khr<Cb>( &self, _command_buffer: Cb, _pipeline_bind_point: PipelineBindPoint, _layout: PipelineLayout, _set: u32, _descriptor_writes: &[WriteDescriptorSet<'_>], ) -> VdResult<()>
where Cb: Handle<Target = CommandBufferHandle>,

Source

pub unsafe fn get_swapchain_status_khr<Sk>( &self, _swapchain: Sk, ) -> VdResult<()>
where Sk: Handle<Target = SwapchainKhrHandle>,

Source

pub unsafe fn import_fence_win32_handle_khr( &self, _import_fence_win32_handle_info: &ImportFenceWin32HandleInfoKhr<'_>, ) -> VdResult<()>

Source

pub unsafe fn get_fence_win32_handle_khr( &self, _get_win32_handle_info: &FenceGetWin32HandleInfoKhr<'_>, ) -> VdResult<()>

Source

pub unsafe fn import_fence_fd_khr( &self, _import_fence_fd_info: &ImportFenceFdInfoKhr<'_>, ) -> VdResult<()>

Source

pub unsafe fn get_fence_fd_khr( &self, _get_fd_info: &FenceGetFdInfoKhr<'_>, ) -> VdResult<()>

Source

pub unsafe fn get_image_memory_requirements_2_khr( &self, _info: &ImageMemoryRequirementsInfo2Khr<'_>, ) -> VdResult<()>

Source

pub fn get_buffer_memory_requirements_2_khr( &self, _info: &BufferMemoryRequirementsInfo2Khr<'_>, ) -> VdResult<()>

Source

pub unsafe fn get_image_sparse_memory_requirements_2_khr( &self, _info: &ImageSparseMemoryRequirementsInfo2Khr<'_>, ) -> VdResult<()>

Source

pub unsafe fn bind_buffer_memory_2_khr(&self)

Source

pub unsafe fn bind_image_memory_2_khr(&self)

Source

pub unsafe fn debug_marker_set_object_tag_ext( &self, _tag_info: &DebugMarkerObjectTagInfoExt<'_>, ) -> VdResult<()>

Source

pub unsafe fn debug_marker_set_object_name_ext( &self, _name_info: &DebugMarkerObjectNameInfoExt<'_>, ) -> VdResult<()>

Source

pub unsafe fn cmd_debug_marker_begin_ext( &self, command_buffer: CommandBufferHandle, marker_info: &DebugMarkerMarkerInfoExt<'_>, )

Source

pub unsafe fn cmd_debug_marker_end_ext( &self, command_buffer: CommandBufferHandle, )

Source

pub unsafe fn cmd_debug_marker_insert_ext( &self, command_buffer: CommandBufferHandle, marker_info: &DebugMarkerMarkerInfoExt<'_>, )

Source

pub unsafe fn cmd_draw_indirect_count_amd(&self)

Source

pub unsafe fn cmd_draw_indexed_indirect_count_amd(&self)

Source

pub unsafe fn get_memory_win32_handle_nv(&self)

Source

pub unsafe fn get_device_group_peer_memory_features_khx(&self)

Source

pub unsafe fn cmd_set_device_mask_khx(&self)

Source

pub unsafe fn cmd_dispatch_base_khx(&self)

Source

pub unsafe fn get_device_group_present_capabilities_khx(&self)

Source

pub unsafe fn get_device_group_surface_present_modes_khx(&self)

Source

pub unsafe fn acquire_next_image2_khx(&self)

Source

pub unsafe fn cmd_process_commands_nvx(&self)

Source

pub unsafe fn cmd_reserve_space_for_commands_nvx(&self)

Source

pub unsafe fn register_objects_nvx(&self)

Source

pub unsafe fn unregister_objects_nvx(&self)

Source

pub unsafe fn cmd_set_viewport_w_scaling_nv(&self)

Source

pub unsafe fn display_power_control_ext<Dk>( &self, _display: Dk, _display_power_info: &DisplayPowerInfoExt<'_>, )
where Dk: Handle<Target = DisplayKhrHandle>,

Source

pub unsafe fn register_device_event_ext( &self, _device_event_info: &DeviceEventInfoExt<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<()>

Source

pub unsafe fn register_display_event_ext<Dk>( &self, _display: Dk, _display_event_info: &DisplayEventInfoExt<'_>, allocator: Option<*const VkAllocationCallbacks>, ) -> VdResult<()>
where Dk: Handle<Target = DisplayKhrHandle>,

Source

pub unsafe fn get_swapchain_counter_ext<Sk>( &self, _swapchain: Sk, _counter: SurfaceCounterFlagsExt, ) -> VdResult<u64>
where Sk: Handle<Target = SwapchainKhrHandle>,

Source

pub unsafe fn get_refresh_cycle_duration_google(&self)

Source

pub unsafe fn get_past_presentation_timing_google(&self)

Source

pub unsafe fn cmd_set_discard_rectangle_ext<Cb>( &self, _command_buffer: Cb, _first_discard_rectangle: u32, _discard_rectangle_count: u32, _discard_rectangles: &Rect2d, ) -> VdResult<()>
where Cb: Handle<Target = CommandBufferHandle>,

Source

pub unsafe fn set_hdr_metadata_ext( &self, _swapchains: &[SwapchainKhrHandle], _metadata: &HdrMetadataExt<'_>, ) -> VdResult<()>

Trait Implementations§

Source§

impl Clone for Device

Source§

fn clone(&self) -> Device

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Device

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'h> Handle for &'h Device

Source§

impl Send for Device

Source§

impl Sync for Device

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.