pub trait PhantomCType {
    fn short_name(&self) -> String;
    fn name_wrapping_var(
        language: &dyn HeaderLanguage,
        var_name: &str
    ) -> String; fn name(&self, language: &dyn HeaderLanguage) -> String; fn csharp_marshaler(&self) -> Option<String>; fn size(&self) -> usize; fn align(&self) -> usize; }
Available on crate feature headers only.
Expand description

T::assoc_func() -> PhantomData::<T>.method() conversion so as to become dyn-friendly (you can’t pass a heterogeneous array of distinct T : Traits types to a function, but you can pass a slice of PhantomData-materialized dyn Traits).

In other words, we are projecting a compile-time type-level knowledge of an array / struct / “table” of a type’s associated functions into a runtime table of such, thence allowing runtime / dynamic unification within a heterogeneous collection.

Required Methods

Implementations on Foreign Types