alef 0.25.52

Opinionated polyglot binding generator for Rust libraries
Documentation
{# Opaque wrapper + conversions must be cfg-gated when they reference feature-gated types. #}
{% if source_cfg %}#[cfg({{ source_cfg }})]
{% endif %}#[frb(opaque)]
pub struct {{ name }} {
    pub(crate) inner: {{ inner_path }},
}

{% if source_cfg %}#[cfg({{ source_cfg }})]
{% endif %}impl From<{{ inner_path }}> for {{ name }} {
    fn from(inner: {{ inner_path }}) -> Self {
        Self { inner }
    }
}

{% if source_cfg %}#[cfg({{ source_cfg }})]
{% endif %}impl From<{{ name }}> for {{ inner_path }} {
    fn from(value: {{ name }}) -> Self {
        value.inner
    }
}