Struct draw2d::graphics::vulkan::command_pool::OwnedCommandPool [−][src]
pub struct OwnedCommandPool { /* fields omitted */ }
Expand description
This structure holds resources for managing an owned command pool. “Owned” means that the owner is responsible for destroying the contained resources before this struct is dropped.
Implementations
Create the command buffer pool.
The caller is responsible for destroying the pool.
The raw command pool handle.
Unsafe Because
- The returned reference is still logically ‘owned’ by this struct and must not be destroyed except via a call to Self::destroy.
pub unsafe fn allocate_command_buffer(
&self,
logical_device: &Device
) -> Result<CommandBuffer>
pub unsafe fn allocate_command_buffer(
&self,
logical_device: &Device
) -> Result<CommandBuffer>
Allocate a new command buffer.
Unsafe Because
- the caller must eventually call Self::reset or else resources will be leaked
pub unsafe fn free_command_buffer(
&self,
logical_device: &Device,
command_buffer: CommandBuffer
)
pub unsafe fn free_command_buffer(
&self,
logical_device: &Device,
command_buffer: CommandBuffer
)
Free a command buffer’s resources to be used by the pool again.
Unsafe Because
- the caller is responsible for ensuring that the command buffer is not being used anymore
- only command buffers created by previous calls to Self::allocate_command_buffer on this instance can be passed to this function
Reset all command buffers allocated by this pool.
Unsafe Because
- the caller is responsible for ensuring that none of the command buffers are still in use
Destroy the command pool.
Unsafe Because
- the caller must ensure that the command pool is not in use when it is destroyed.
Auto Trait Implementations
impl RefUnwindSafe for OwnedCommandPool
impl Send for OwnedCommandPool
impl Sync for OwnedCommandPool
impl Unpin for OwnedCommandPool
impl UnwindSafe for OwnedCommandPool
Blanket Implementations
Mutably borrows from an owned value. Read more
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
Checks if self
is actually part of its subset T
(and can be converted to it).
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
The inclusion map: converts self
to the equivalent element of its superset.