pub struct ModuleBuilder { /* private fields */ }Expand description
Builder helpers that keep the node graph consistent while constructing a module by hand or from another IR.
Implementations§
Source§impl ModuleBuilder
impl ModuleBuilder
pub fn new() -> Self
pub fn push(&mut self, node: Inode) -> NodeId
pub fn root(&mut self, id: NodeId) -> &mut Self
pub fn bind(&mut self, name: impl Into<String>, id: NodeId) -> &mut Self
pub fn annotate(&mut self, node: NodeId, kind: AnnotationKind) -> &mut Self
pub fn provenance(&mut self, provenance: Provenance) -> &mut Self
pub fn build(self) -> InfinityModule
Trait Implementations§
Source§impl Debug for ModuleBuilder
impl Debug for ModuleBuilder
Auto Trait Implementations§
impl Freeze for ModuleBuilder
impl RefUnwindSafe for ModuleBuilder
impl Send for ModuleBuilder
impl Sync for ModuleBuilder
impl Unpin for ModuleBuilder
impl UnsafeUnpin for ModuleBuilder
impl UnwindSafe for ModuleBuilder
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