alef 0.32.6

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
impl {{ wrapper_name }} {
    /// Create a new bridge wrapping an Elixir PID.
    ///
    /// The PID is stored directly (it is Copy + Send + Sync).
    /// Messages are dispatched via the trait methods using channels for sync/async dispatch.
    /// `implemented_methods` lists the functions the implementation module exports;
    /// Rust-defaulted trait methods outside this set fall back to their default bodies.
    pub fn new(pid: rustler::LocalPid, name: String, implemented_methods: Vec<String>) -> Self {
        Self {
            inner: pid,
            cached_name: name,
            implemented_methods: implemented_methods.into_iter().collect(),
        }
    }
}