Struct vulkano::instance::debug::DebugCallback [−][src]
pub struct DebugCallback { /* fields omitted */ }
Expand description
Registration of a callback called by validation layers.
The callback can be called as long as this object is alive.
Implementations
pub fn new<F>(
instance: &Arc<Instance>,
severity: MessageSeverity,
ty: MessageType,
user_callback: F
) -> Result<DebugCallback, DebugCallbackCreationError> where
F: Fn(&Message<'_>) + 'static + Send + RefUnwindSafe,
pub fn new<F>(
instance: &Arc<Instance>,
severity: MessageSeverity,
ty: MessageType,
user_callback: F
) -> Result<DebugCallback, DebugCallbackCreationError> where
F: Fn(&Message<'_>) + 'static + Send + RefUnwindSafe,
Initializes a debug callback.
Panics generated by calling user_callback
are ignored.
pub fn errors_and_warnings<F>(
instance: &Arc<Instance>,
user_callback: F
) -> Result<DebugCallback, DebugCallbackCreationError> where
F: Fn(&Message<'_>) + Send + 'static + RefUnwindSafe,
pub fn errors_and_warnings<F>(
instance: &Arc<Instance>,
user_callback: F
) -> Result<DebugCallback, DebugCallbackCreationError> where
F: Fn(&Message<'_>) + Send + 'static + RefUnwindSafe,
Initializes a debug callback with errors and warnings.
Shortcut for new(instance, MessageTypes::errors_and_warnings(), user_callback)
.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for DebugCallback
impl Send for DebugCallback
impl !Sync for DebugCallback
impl Unpin for DebugCallback
impl !UnwindSafe for DebugCallback
Blanket Implementations
Mutably borrows from an owned value. Read more
Builds a pointer to this type from a raw pointer.
Returns true if the size is suitable to store a type like this.
Returns the size of an individual element.