pub struct DebugCallback { /* private fields */ }
Expand description
Registration of a callback called by validation layers.
The callback can be called as long as this object is alive.
Implementations
sourceimpl DebugCallback
impl DebugCallback
sourcepub 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.
sourcepub 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more