pub struct MetalBackend { /* private fields */ }Expand description
Emitter state for producing Metal Shading Language .metal source files.
Implementations§
Source§impl MetalBackend
impl MetalBackend
Sourcepub fn with_indent(indent_width: usize) -> Self
pub fn with_indent(indent_width: usize) -> Self
Create a backend with a custom indent width.
Sourcepub fn emit_stmt(&self, stmt: &MetalStmt, depth: usize) -> String
pub fn emit_stmt(&self, stmt: &MetalStmt, depth: usize) -> String
Emit a single statement at the given indentation depth.
Sourcepub fn emit_shader(&self, shader: &MetalShader) -> String
pub fn emit_shader(&self, shader: &MetalShader) -> String
Emit the full .metal source file as a String.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MetalBackend
impl RefUnwindSafe for MetalBackend
impl Send for MetalBackend
impl Sync for MetalBackend
impl Unpin for MetalBackend
impl UnsafeUnpin for MetalBackend
impl UnwindSafe for MetalBackend
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