pub struct LibraryDescriptor(/* private fields */);Expand description
Descriptor for creating a Metal library.
C++ equivalent: MTL4::LibraryDescriptor
LibraryDescriptor specifies the source code, name, and compile options for creating a Metal shader library.
Implementations§
Source§impl LibraryDescriptor
impl LibraryDescriptor
Sourcepub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
Create a LibraryDescriptor from a raw pointer.
Sourcepub fn set_name(&self, name: &str)
pub fn set_name(&self, name: &str)
Set the name.
C++ equivalent: void setName(const NS::String*)
Sourcepub fn source(&self) -> Option<String>
pub fn source(&self) -> Option<String>
Get the source code.
C++ equivalent: NS::String* source() const
Sourcepub fn set_source(&self, source: &str)
pub fn set_source(&self, source: &str)
Set the source code.
C++ equivalent: void setSource(const NS::String*)
Sourcepub fn options(&self) -> Option<CompileOptions>
pub fn options(&self) -> Option<CompileOptions>
Get the compile options.
C++ equivalent: MTL::CompileOptions* options() const
Sourcepub fn set_options(&self, options: &CompileOptions)
pub fn set_options(&self, options: &CompileOptions)
Set the compile options.
C++ equivalent: void setOptions(const MTL::CompileOptions*)
Trait Implementations§
Source§impl Clone for LibraryDescriptor
impl Clone for LibraryDescriptor
Source§impl Debug for LibraryDescriptor
impl Debug for LibraryDescriptor
Source§impl Drop for LibraryDescriptor
impl Drop for LibraryDescriptor
Source§impl Referencing for LibraryDescriptor
impl Referencing for LibraryDescriptor
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 LibraryDescriptor
impl Sync for LibraryDescriptor
Auto Trait Implementations§
impl Freeze for LibraryDescriptor
impl RefUnwindSafe for LibraryDescriptor
impl Unpin for LibraryDescriptor
impl UnwindSafe for LibraryDescriptor
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