pub struct DebugUtilsMessengerCreateInfo {
pub message_severity: DebugUtilsMessageSeverity,
pub message_type: DebugUtilsMessageType,
pub user_callback: Arc<dyn Fn(&Message<'_>) + RefUnwindSafe + Send + Sync>,
pub _ne: NonExhaustive,
}
Expand description
Parameters to create a DebugUtilsMessenger
.
Fields
message_severity: DebugUtilsMessageSeverity
The message severity types that the callback should be called for.
The value must not be empty.
The default value is MessageSeverity::errors_and_warnings()
.
message_type: DebugUtilsMessageType
The message types that the callback should be called for.
The value must not be empty.
The default value is MessageType::general()
.
user_callback: Arc<dyn Fn(&Message<'_>) + RefUnwindSafe + Send + Sync>
The closure that should be called.
The closure must not make any calls to the Vulkan API. If the closure panics, the panic is caught and ignored.
The callback is provided inside an Arc
so that it can be shared across multiple
messengers.
_ne: NonExhaustive
Implementations
sourceimpl DebugUtilsMessengerCreateInfo
impl DebugUtilsMessengerCreateInfo
sourcepub fn user_callback(
user_callback: Arc<dyn Fn(&Message<'_>) + RefUnwindSafe + Send + Sync>
) -> Self
pub fn user_callback(
user_callback: Arc<dyn Fn(&Message<'_>) + RefUnwindSafe + Send + Sync>
) -> Self
Returns a DebugUtilsMessengerCreateInfo
with the specified user_callback
.
Trait Implementations
sourceimpl Clone for DebugUtilsMessengerCreateInfo
impl Clone for DebugUtilsMessengerCreateInfo
sourcefn clone(&self) -> DebugUtilsMessengerCreateInfo
fn clone(&self) -> DebugUtilsMessengerCreateInfo
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl RefUnwindSafe for DebugUtilsMessengerCreateInfo
impl Send for DebugUtilsMessengerCreateInfo
impl Sync for DebugUtilsMessengerCreateInfo
impl Unpin for DebugUtilsMessengerCreateInfo
impl UnwindSafe for DebugUtilsMessengerCreateInfo
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