pub struct BeamLinker { /* private fields */ }Expand description
Links multiple BEAM modules into a combined module by merging functions.
Used for compiling multiple source files into a single Erlang module (e.g., when inlining helper libraries).
Implementations§
Source§impl BeamLinker
impl BeamLinker
Sourcepub fn new(target: impl Into<String>) -> Self
pub fn new(target: impl Into<String>) -> Self
Create a new linker targeting the given module name.
Sourcepub fn add_module(&mut self, module: BeamModule)
pub fn add_module(&mut self, module: BeamModule)
Add a module to be linked.
Sourcepub fn rename(
&mut self,
src_module: impl Into<String>,
src_name: impl Into<String>,
new_name: impl Into<String>,
)
pub fn rename( &mut self, src_module: impl Into<String>, src_name: impl Into<String>, new_name: impl Into<String>, )
Rename a function during linking to avoid name collisions.
Sourcepub fn link(self) -> BeamModule
pub fn link(self) -> BeamModule
Perform the link and produce a merged BeamModule.
Trait Implementations§
Source§impl Clone for BeamLinker
impl Clone for BeamLinker
Source§fn clone(&self) -> BeamLinker
fn clone(&self) -> BeamLinker
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 BeamLinker
impl Debug for BeamLinker
Source§impl Default for BeamLinker
impl Default for BeamLinker
Source§fn default() -> BeamLinker
fn default() -> BeamLinker
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BeamLinker
impl RefUnwindSafe for BeamLinker
impl Send for BeamLinker
impl Sync for BeamLinker
impl Unpin for BeamLinker
impl UnsafeUnpin for BeamLinker
impl UnwindSafe for BeamLinker
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