Struct CompileOptions

Source
pub struct CompileOptions(/* private fields */);

Implementations§

Source§

impl CompileOptions

Source

pub fn new() -> Self

Methods from Deref<Target = CompileOptionsRef>§

Source

pub unsafe fn preprocessor_macros(&self) -> *mut Object

Source

pub unsafe fn set_preprocessor_macros(&self, defines: *mut Object)

Source

pub fn is_fast_math_enabled(&self) -> bool

Source

pub fn set_fast_math_enabled(&self, enabled: bool)

Source

pub fn language_version(&self) -> MTLLanguageVersion

Only available on (macos(10.11), ios(9.0))

Source

pub fn set_language_version(&self, version: MTLLanguageVersion)

Only available on (macos(10.11), ios(9.0))

Source

pub fn library_type(&self) -> MTLLibraryType

Only available on (macos(11.0), ios(14.0))

Source

pub fn set_library_type(&self, lib_type: MTLLibraryType)

Only available on (macos(11.0), ios(14.0))

Source

pub fn install_name(&self) -> &str

Only available on (macos(11.0), ios(14.0))

Source

pub fn set_install_name(&self, name: &str)

Only available on (macos(11.0), ios(14.0))

Source

pub fn libraries(&self) -> Vec<DynamicLibrary>

Only available on (macos(11.0), ios(14.0))

Marshal to Rust Vec

Source

pub fn libraries_as_nsarray(&self) -> &ArrayRef<DynamicLibrary>

Only available on (macos(11.0), ios(14.0))

As raw NSArray

Source

pub fn set_libraries(&self, libraries: &[&DynamicLibraryRef])

Only available on (macos(11.0), ios(14.0))

Marshal from Rust slice

Source

pub fn set_libraries_nsarray(&self, libraries: &ArrayRef<DynamicLibrary>)

Only available on (macos(11.0), ios(14.0))

From raw NSArray

Source

pub fn preserve_invariance(&self) -> bool

Only available on (macos(11.0), macCatalyst(14.0), ios(13.0))

Source

pub fn set_preserve_invariance(&self, preserve: bool)

Only available on (macos(11.0), macCatalyst(14.0), ios(13.0))

Trait Implementations§

Source§

impl AsMut<CompileOptionsRef> for CompileOptions

Source§

fn as_mut(&mut self) -> &mut CompileOptionsRef

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<CompileOptionsRef> for CompileOptions

Source§

fn as_ref(&self) -> &CompileOptionsRef

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Borrow<CompileOptionsRef> for CompileOptions

Source§

fn borrow(&self) -> &CompileOptionsRef

Immutably borrows from an owned value. Read more
Source§

impl BorrowMut<CompileOptionsRef> for CompileOptions

Source§

fn borrow_mut(&mut self) -> &mut CompileOptionsRef

Mutably borrows from an owned value. Read more
Source§

impl Clone for CompileOptions

Source§

fn clone(&self) -> CompileOptions

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CompileOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for CompileOptions

Source§

type Target = CompileOptionsRef

The resulting type after dereferencing.
Source§

fn deref(&self) -> &CompileOptionsRef

Dereferences the value.
Source§

impl DerefMut for CompileOptions

Source§

fn deref_mut(&mut self) -> &mut CompileOptionsRef

Mutably dereferences the value.
Source§

impl Drop for CompileOptions

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl ForeignType for CompileOptions

Source§

type CType = MTLCompileOptions

The raw C type.
Source§

type Ref = CompileOptionsRef

The type representing a reference to this type.
Source§

unsafe fn from_ptr(ptr: *mut MTLCompileOptions) -> CompileOptions

Constructs an instance of this type from its raw type. Read more
Source§

fn as_ptr(&self) -> *mut MTLCompileOptions

Returns a raw pointer to the wrapped value.
Source§

fn into_ptr(self) -> *mut Self::CType

Consumes the wrapper and returns the raw pointer.
Source§

impl Send for CompileOptions

Source§

impl Sync for CompileOptions

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.