pub struct MetalSurfaceDescriptor {
pub logical_size: LogicalSize,
pub context: MetalContextDescriptor,
pub layer: *mut c_void,
}Expand description
A Metal layer to render to, for MapHandle::attach_metal_surface().
The session sets the layer’s device, pixel format, and drawable size. It uses the layer until a replacement or release of the target completes, a detach or release of the session completes, or an abandon of it returns.
See mln_metal_surface_descriptor in the
C API reference.
Fields§
§logical_size: LogicalSize§context: MetalContextDescriptorThe MTLDevice to render with. A null device picks the system’s default.
layer: *mut c_voidYour CAMetalLayer.
Implementations§
Source§impl MetalSurfaceDescriptor
impl MetalSurfaceDescriptor
pub fn new(logical_size: LogicalSize, layer: *mut c_void) -> Self
Trait Implementations§
Source§impl Clone for MetalSurfaceDescriptor
impl Clone for MetalSurfaceDescriptor
Source§fn clone(&self) -> MetalSurfaceDescriptor
fn clone(&self) -> MetalSurfaceDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MetalSurfaceDescriptor
Source§impl Debug for MetalSurfaceDescriptor
impl Debug for MetalSurfaceDescriptor
Source§impl PartialEq for MetalSurfaceDescriptor
impl PartialEq for MetalSurfaceDescriptor
impl StructuralPartialEq for MetalSurfaceDescriptor
Auto Trait Implementations§
impl !Send for MetalSurfaceDescriptor
impl !Sync for MetalSurfaceDescriptor
impl Freeze for MetalSurfaceDescriptor
impl RefUnwindSafe for MetalSurfaceDescriptor
impl Unpin for MetalSurfaceDescriptor
impl UnsafeUnpin for MetalSurfaceDescriptor
impl UnwindSafe for MetalSurfaceDescriptor
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more