Struct metal::LibraryRef
source · pub struct LibraryRef(/* private fields */);
Expand description
A borrowed reference to a Library
.
Implementations§
source§impl LibraryRef
impl LibraryRef
pub fn device(&self) -> &DeviceRef
pub fn label(&self) -> &str
pub fn set_label(&self, label: &str)
pub fn get_function( &self, name: &str, constants: Option<FunctionConstantValues>, ) -> Result<Function, String>
pub fn function_names(&self) -> Vec<String>
sourcepub fn library_type(&self) -> MTLLibraryType
pub fn library_type(&self) -> MTLLibraryType
Only available on (macos(11.0), ios(14.0))
sourcepub fn install_name(&self) -> Option<&str>
pub fn install_name(&self) -> Option<&str>
Only available on (macos(11.0), ios(14.0))
sourcepub fn new_function_with_descriptor(
&self,
descriptor: &FunctionDescriptorRef,
) -> Result<Function, String>
pub fn new_function_with_descriptor( &self, descriptor: &FunctionDescriptorRef, ) -> Result<Function, String>
Only available on (macos(11.0), ios(14.0))
sourcepub fn new_intersection_function_with_descriptor(
&self,
descriptor: &IntersectionFunctionDescriptorRef,
) -> Result<Function, String>
pub fn new_intersection_function_with_descriptor( &self, descriptor: &IntersectionFunctionDescriptorRef, ) -> Result<Function, String>
Only available on (macos(11.0), ios(14.0))
Trait Implementations§
source§impl AsMut<LibraryRef> for Library
impl AsMut<LibraryRef> for Library
source§fn as_mut(&mut self) -> &mut LibraryRef
fn as_mut(&mut self) -> &mut LibraryRef
Converts this type into a mutable reference of the (usually inferred) input type.
source§impl AsRef<LibraryRef> for Library
impl AsRef<LibraryRef> for Library
source§fn as_ref(&self) -> &LibraryRef
fn as_ref(&self) -> &LibraryRef
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Borrow<LibraryRef> for Library
impl Borrow<LibraryRef> for Library
source§fn borrow(&self) -> &LibraryRef
fn borrow(&self) -> &LibraryRef
Immutably borrows from an owned value. Read more
source§impl BorrowMut<LibraryRef> for Library
impl BorrowMut<LibraryRef> for Library
source§fn borrow_mut(&mut self) -> &mut LibraryRef
fn borrow_mut(&mut self) -> &mut LibraryRef
Mutably borrows from an owned value. Read more
source§impl Debug for LibraryRef
impl Debug for LibraryRef
source§impl ForeignTypeRef for LibraryRef
impl ForeignTypeRef for LibraryRef
§type CType = MTLLibrary
type CType = MTLLibrary
The raw C type.
source§unsafe fn from_ptr<'a>(ptr: *mut Self::CType) -> &'a Self
unsafe fn from_ptr<'a>(ptr: *mut Self::CType) -> &'a Self
Constructs a shared instance of this type from its raw type. Read more
source§unsafe fn from_ptr_mut<'a>(ptr: *mut Self::CType) -> &'a mut Self
unsafe fn from_ptr_mut<'a>(ptr: *mut Self::CType) -> &'a mut Self
Constructs a mutable reference of this type from its raw type. Read more
source§impl Message for LibraryRef
impl Message for LibraryRef
source§unsafe fn send_message<A, R>(
&self,
sel: Sel,
args: A,
) -> Result<R, MessageError>
unsafe fn send_message<A, R>( &self, sel: Sel, args: A, ) -> Result<R, MessageError>
Sends a message to self with the given selector and arguments. Read more
source§fn verify_message<A, R>(&self, sel: Sel) -> Result<(), MessageError>
fn verify_message<A, R>(&self, sel: Sel) -> Result<(), MessageError>
Verifies that the argument and return types match the encoding of the
method for the given selector. Read more
source§impl ToOwned for LibraryRef
impl ToOwned for LibraryRef
impl Send for LibraryRef
impl Sync for LibraryRef
Auto Trait Implementations§
impl Freeze for LibraryRef
impl !RefUnwindSafe for LibraryRef
impl Unpin for LibraryRef
impl UnwindSafe for LibraryRef
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