Struct vulkano::instance::debug::DebugCallback
[−]
[src]
#[must_use = "The DebugCallback object must be kept alive for as long as you want your callback to be called"]pub struct DebugCallback { /* fields omitted */ }
Registration of a callback called by validation layers.
The callback can be called as long as this object is alive.
Methods
impl DebugCallback
[src]
fn new<F>(
instance: &Arc<Instance>,
messages: MessageTypes,
user_callback: F
) -> Result<DebugCallback, DebugCallbackCreationError> where
F: Fn(&Message) + 'static + Send + RefUnwindSafe,
instance: &Arc<Instance>,
messages: MessageTypes,
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.
fn errors_and_warnings<F>(
instance: &Arc<Instance>,
user_callback: F
) -> Result<DebugCallback, DebugCallbackCreationError> where
F: Fn(&Message) + Send + 'static + RefUnwindSafe,
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)
.