pub struct ArenaProgram<'a> { /* private fields */ }Expand description
Lightweight program scaffold for arena-backed expression builders.
Implementations§
Source§impl<'a> ArenaProgram<'a>
impl<'a> ArenaProgram<'a>
Sourcepub fn push_expr(&mut self, expr: Expr) -> ExprRef
pub fn push_expr(&mut self, expr: Expr) -> ExprRef
Allocate expr in the backing arena and append it to the entry list.
Sourcepub fn expr(&self, expr_ref: ExprRef) -> Option<&Expr>
pub fn expr(&self, expr_ref: ExprRef) -> Option<&Expr>
Return an expression previously appended to this arena program.
Sourcepub fn buffers(&self) -> &[BufferDecl]
pub fn buffers(&self) -> &[BufferDecl]
Declared buffers.
Sourcepub fn buffer(&self, name: &str) -> Option<&BufferDecl>
pub fn buffer(&self, name: &str) -> Option<&BufferDecl>
Look up a declared buffer by name.
Sourcepub fn workgroup_size(&self) -> [u32; 3]
pub fn workgroup_size(&self) -> [u32; 3]
Workgroup dimensions.
Auto Trait Implementations§
impl<'a> Freeze for ArenaProgram<'a>
impl<'a> !RefUnwindSafe for ArenaProgram<'a>
impl<'a> !Send for ArenaProgram<'a>
impl<'a> !Sync for ArenaProgram<'a>
impl<'a> Unpin for ArenaProgram<'a>
impl<'a> UnsafeUnpin for ArenaProgram<'a>
impl<'a> !UnwindSafe for ArenaProgram<'a>
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