pub struct MetalParam {
pub ty: MetalType,
pub name: String,
pub attr: MetalParamAttr,
}Expand description
A parameter in a Metal shader function.
Fields§
§ty: MetalTypeParameter type
name: StringParameter name
attr: MetalParamAttrMetal binding attribute
Implementations§
Source§impl MetalParam
impl MetalParam
Sourcepub fn new(ty: MetalType, name: impl Into<String>) -> Self
pub fn new(ty: MetalType, name: impl Into<String>) -> Self
Create a plain parameter without an attribute.
Sourcepub fn buffer(ty: MetalType, name: impl Into<String>, index: u32) -> Self
pub fn buffer(ty: MetalType, name: impl Into<String>, index: u32) -> Self
Create a parameter with a buffer binding.
Sourcepub fn texture(ty: MetalType, name: impl Into<String>, index: u32) -> Self
pub fn texture(ty: MetalType, name: impl Into<String>, index: u32) -> Self
Create a parameter with a texture binding.
Sourcepub fn builtin(b: MetalBuiltin) -> Self
pub fn builtin(b: MetalBuiltin) -> Self
Create a parameter with a built-in attribute.
Trait Implementations§
Source§impl Clone for MetalParam
impl Clone for MetalParam
Source§fn clone(&self) -> MetalParam
fn clone(&self) -> MetalParam
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MetalParam
impl Debug for MetalParam
Source§impl PartialEq for MetalParam
impl PartialEq for MetalParam
impl StructuralPartialEq for MetalParam
Auto Trait Implementations§
impl Freeze for MetalParam
impl RefUnwindSafe for MetalParam
impl Send for MetalParam
impl Sync for MetalParam
impl Unpin for MetalParam
impl UnsafeUnpin for MetalParam
impl UnwindSafe for MetalParam
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