Struct vulkano::instance::debug::DebugCallback
source · 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>,
messages: MessageTypes,
user_callback: F
) -> Result<DebugCallback, DebugCallbackCreationError>where
F: Fn(&Message<'_>) + 'static + Send + RefUnwindSafe,
pub fn new<F>(
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.
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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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
sourceimpl<T> Content for T
impl<T> Content for T
sourcefn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
sourcefn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.
sourcefn indiv_size() -> usize
fn indiv_size() -> usize
Returns the size of an individual element.