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

An operation on the host that has been deferred.

The object cannot be dropped while an operation is pending. If it is dropped prematurely, the current thread will block to wait for the operation to finish.

Implementations§

source§

impl DeferredOperation

source

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

Creates a new DeferredOperation.

The khr_deferred_host_operations extension must be enabled on the device.

source

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

Creates a new DeferredOperation from a raw object handle.

Safety
  • handle must be a valid Vulkan object handle created from device.
source

pub fn join(&self) -> Result<DeferredOperationJoinStatus, VulkanError>

Executes a portion of the operation on the current thread.

source

pub fn result(&self) -> Option<Result<(), VulkanError>>

Returns the result of the operation, or None if the operation is not yet complete.

source

pub fn wait(&self) -> Result<Result<(), VulkanError>, VulkanError>

Waits for the operation to complete, then returns its result.

source

pub fn max_concurrency(&self) -> Option<u32>

The maximum number of threads that could usefully execute the operation at this point in its execution, or zero if the operation is complete.

Returns None if no exact number of threads can be calculated.

Trait Implementations§

source§

impl Debug for DeferredOperation

source§

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

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

impl DeviceOwned for DeferredOperation

source§

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

Returns the device that owns self.
source§

impl Drop for DeferredOperation

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl VulkanObject for DeferredOperation

§

type Handle = DeferredOperationKHR

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.