Struct metal::MetalLayerRef
source · pub struct MetalLayerRef(/* private fields */);
Expand description
A borrowed reference to a MetalLayer
.
Implementations§
source§impl MetalLayerRef
impl MetalLayerRef
pub fn device(&self) -> &DeviceRef
pub fn set_device(&self, device: &DeviceRef)
pub fn pixel_format(&self) -> MTLPixelFormat
pub fn set_pixel_format(&self, pixel_format: MTLPixelFormat)
pub fn drawable_size(&self) -> CGSize
pub fn set_drawable_size(&self, size: CGSize)
pub fn presents_with_transaction(&self) -> bool
pub fn set_presents_with_transaction(&self, transaction: bool)
pub fn display_sync_enabled(&self) -> bool
pub fn set_display_sync_enabled(&self, enabled: bool)
pub fn maximum_drawable_count(&self) -> NSUInteger
pub fn set_maximum_drawable_count(&self, count: NSUInteger)
pub fn set_edge_antialiasing_mask(&self, mask: u64)
pub fn set_masks_to_bounds(&self, masks: bool)
pub fn remove_all_animations(&self)
pub fn next_drawable(&self) -> Option<&MetalDrawableRef>
pub fn contents_scale(&self) -> CGFloat
pub fn set_contents_scale(&self, scale: CGFloat)
sourcepub fn framebuffer_only(&self) -> bool
pub fn framebuffer_only(&self) -> bool
pub fn set_framebuffer_only(&self, framebuffer_only: bool)
pub fn is_opaque(&self) -> bool
pub fn set_opaque(&self, opaque: bool)
pub fn wants_extended_dynamic_range_content(&self) -> bool
pub fn set_wants_extended_dynamic_range_content( &self, wants_extended_dynamic_range_content: bool, )
Trait Implementations§
source§impl AsMut<MetalLayerRef> for MetalLayer
impl AsMut<MetalLayerRef> for MetalLayer
source§fn as_mut(&mut self) -> &mut MetalLayerRef
fn as_mut(&mut self) -> &mut MetalLayerRef
Converts this type into a mutable reference of the (usually inferred) input type.
source§impl AsRef<MetalLayerRef> for MetalLayer
impl AsRef<MetalLayerRef> for MetalLayer
source§fn as_ref(&self) -> &MetalLayerRef
fn as_ref(&self) -> &MetalLayerRef
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Borrow<MetalLayerRef> for MetalLayer
impl Borrow<MetalLayerRef> for MetalLayer
source§fn borrow(&self) -> &MetalLayerRef
fn borrow(&self) -> &MetalLayerRef
Immutably borrows from an owned value. Read more
source§impl BorrowMut<MetalLayerRef> for MetalLayer
impl BorrowMut<MetalLayerRef> for MetalLayer
source§fn borrow_mut(&mut self) -> &mut MetalLayerRef
fn borrow_mut(&mut self) -> &mut MetalLayerRef
Mutably borrows from an owned value. Read more
source§impl Debug for MetalLayerRef
impl Debug for MetalLayerRef
source§impl ForeignTypeRef for MetalLayerRef
impl ForeignTypeRef for MetalLayerRef
§type CType = CAMetalLayer
type CType = CAMetalLayer
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 MetalLayerRef
impl Message for MetalLayerRef
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 MetalLayerRef
impl ToOwned for MetalLayerRef
§type Owned = MetalLayer
type Owned = MetalLayer
The resulting type after obtaining ownership.
source§fn to_owned(&self) -> MetalLayer
fn to_owned(&self) -> MetalLayer
Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
Uses borrowed data to replace owned data, usually by cloning. Read more
impl Send for MetalLayerRef
impl Sync for MetalLayerRef
Auto Trait Implementations§
impl Freeze for MetalLayerRef
impl !RefUnwindSafe for MetalLayerRef
impl Unpin for MetalLayerRef
impl UnwindSafe for MetalLayerRef
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