pub struct PrivateDataSlot { /* private fields */ }
Expand description

An object that stores one u64 value per Vulkan object.

Implementations§

source§

impl PrivateDataSlot

source

pub fn new( device: Arc<Device>, create_info: PrivateDataSlotCreateInfo ) -> Result<Self, Validated<VulkanError>>

Creates a new PrivateDataSlot.

The private_data feature must be enabled on the device.

source

pub unsafe fn from_handle( device: Arc<Device>, handle: PrivateDataSlot, _create_info: PrivateDataSlotCreateInfo ) -> Self

Creates a new PrivateDataSlot from a raw object handle.

Safety
  • handle must be a valid Vulkan object handle created from device.
  • create_info must match the info used to create the object.
source

pub fn set_private_data<T: VulkanObject + DeviceOwned>( &self, object: &T, data: u64 ) -> Result<(), Validated<VulkanError>>

Sets the private data that is associated with object to data.

If self already has data for object, that data is replaced with the new value.

source

pub fn get_private_data<T: VulkanObject + DeviceOwned>(&self, object: &T) -> u64

Returns the private data in self that is associated with object.

If no private data was previously set, 0 is returned.

Trait Implementations§

source§

impl Debug for PrivateDataSlot

source§

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

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

impl DeviceOwned for PrivateDataSlot

source§

fn device(&self) -> &Arc<Device>

Returns the device that owns self.
source§

impl Drop for PrivateDataSlot

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl VulkanObject for PrivateDataSlot

§

type Handle = PrivateDataSlot

The type of the object.
source§

fn handle(&self) -> Self::Handle

Returns the raw Vulkan handle of the object.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> DeviceOwnedVulkanObject for Twhere T: DeviceOwned + VulkanObject,

source§

fn set_debug_utils_object_name( &self, object_name: Option<&str> ) -> Result<(), VulkanError>

Assigns a human-readable name to the object for debugging purposes. 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 Twhere 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, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.