pub struct LogState(/* private fields */);Expand description
A log state for capturing GPU shader logs.
C++ equivalent: MTL::LogState
Log states are created from a device using a descriptor. They can be attached to command buffers to capture shader logs.
Implementations§
Source§impl LogState
impl LogState
Sourcepub unsafe fn add_log_handler_raw(&self, block: *const c_void)
pub unsafe fn add_log_handler_raw(&self, block: *const c_void)
Add a log handler (raw block pointer version).
C++ equivalent: void addLogHandler(void(^)(NS::String*, NS::String*, LogLevel, NS::String*))
§Safety
The block pointer must be a valid Objective-C block.
Sourcepub fn add_log_handler<F>(&self, handler: F)
pub fn add_log_handler<F>(&self, handler: F)
Add a log handler to receive shader log messages.
C++ equivalent: void addLogHandler(void(^)(NS::String*, NS::String*, LogLevel, NS::String*))
The handler is called with:
subsystem- The subsystem that generated the logcategory- The category of the log messagelevel- The severity level of the log messagemessage- The actual log message content
Trait Implementations§
Source§impl Referencing for LogState
impl Referencing for LogState
Source§fn as_mut_ptr(&self) -> *mut c_void
fn as_mut_ptr(&self) -> *mut c_void
Get the raw mutable pointer to the Objective-C object.
Source§fn retain(&self) -> Selfwhere
Self: Clone,
fn retain(&self) -> Selfwhere
Self: Clone,
Retain the object, incrementing its reference count. Read more
Source§fn autorelease(&self) -> Selfwhere
Self: Clone,
fn autorelease(&self) -> Selfwhere
Self: Clone,
Autorelease the object. Read more
Source§fn retain_count(&self) -> usize
fn retain_count(&self) -> usize
Get the retain count of the object. Read more
impl Send for LogState
impl Sync for LogState
Auto Trait Implementations§
impl Freeze for LogState
impl RefUnwindSafe for LogState
impl Unpin for LogState
impl UnwindSafe for LogState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more