Enum LayerResult

Source
pub enum LayerResult<T> {
    Handled(T),
    Unhandled,
}
Expand description

The return value of an intercepted Vulkan command by the layer implementation.

The layer framework uses the value of this type to decide whether to call into the next call chain after calling into the layer implementation. For an intercepted Vulkan command, if the layer implementation returns LayerResult::Handled, the layer framework won’t call into the next layer call chain. Otherwise, if LayerResult::Unhandled is returned, the layer framework will call into the next layer call chain with the original parameters.

Variants§

§

Handled(T)

The layer implementation has handled this Vulkan command, so the layer framework shouldn’t try to call into the next call chain.

This can be useful if the layer implementation wants to modify the parameters passed to the next call chain, or wants to use some other Vulkan commands to fake/emulate the intercepted Vulkan command. This is useful when the layer wants to emulate an unsupported extension. T is usually ash::prelude::VkResult<U>.

§

Unhandled

The layer implementation doesn’t handle this Vulkan command, so the layer framework should call into the next call chain with the original parameters.

If the layer implementation doesn’t want to bother calling into the next call chain, and wants the layer framework to do the job, this variant can be used. Note that if the layer implementation needs to inform the layer framework that there is an error and needs to return early, LayerResult::Handled should be used.

Trait Implementations§

Source§

impl<T: Clone> Clone for LayerResult<T>

Source§

fn clone(&self) -> LayerResult<T>

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

Auto Trait Implementations§

§

impl<T> Freeze for LayerResult<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for LayerResult<T>
where T: RefUnwindSafe,

§

impl<T> Send for LayerResult<T>
where T: Send,

§

impl<T> Sync for LayerResult<T>
where T: Sync,

§

impl<T> Unpin for LayerResult<T>
where T: Unpin,

§

impl<T> UnwindSafe for LayerResult<T>
where T: UnwindSafe,

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
§

impl<T> Any for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

§

fn type_name(&self) -> &'static str

§

impl<T> AnySync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

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.