Trait MemoryBound

Source
pub trait MemoryBound: VkHandle {
    type MemoryRequirementsInfo2<'b>
       where Self: 'b;

    // Required methods
    fn requirements(&self) -> VkMemoryRequirements;
    fn requirements2<'b>(&'b self) -> Self::MemoryRequirementsInfo2<'b>;
    fn bind(
        &mut self,
        memory: &(impl VkHandle<Handle = VkDeviceMemory> + ?Sized),
        offset: usize,
    ) -> Result<()>
       where Self: VkHandleMut;
}
Expand description

Common operations for memory bound objects

Required Associated Types§

Source

type MemoryRequirementsInfo2<'b> where Self: 'b

Required Methods§

Source

fn requirements(&self) -> VkMemoryRequirements

Returns the memory requirements for specified Vulkan object

Source

fn requirements2<'b>(&'b self) -> Self::MemoryRequirementsInfo2<'b>

Source

fn bind( &mut self, memory: &(impl VkHandle<Handle = VkDeviceMemory> + ?Sized), offset: usize, ) -> Result<()>
where Self: VkHandleMut,

Bind device memory to the object

§Failure

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<Device: VkHandle<Handle = VkDevice>> MemoryBound for BufferObject<Device>

Source§

impl<Device: VkHandle<Handle = VkDevice>> MemoryBound for ImageObject<Device>