Trait safer_ffi::headers::languages::HeaderLanguage
source · pub trait HeaderLanguage: UpcastAny {
// Required methods
fn emit_simple_enum(
&self,
ctx: &mut dyn Definer,
docs: &'_ [&'_ str],
self_ty: &dyn PhantomCType,
backing_integer: Option<&dyn PhantomCType>,
variants: &[EnumVariant<'_>]
) -> Result<()>;
fn emit_struct(
&self,
ctx: &mut dyn Definer,
docs: &'_ [&'_ str],
self_ty: &dyn PhantomCType,
fields: &[StructField<'_>]
) -> Result<()>;
fn emit_opaque_type(
&self,
ctx: &mut dyn Definer,
docs: &'_ [&'_ str],
self_ty: &dyn PhantomCType
) -> Result<()>;
fn emit_function(
&self,
ctx: &mut dyn Definer,
docs: &'_ [&'_ str],
fname: &str,
args: &[FunctionArg<'_>],
ret_ty: &dyn PhantomCType
) -> Result<()>;
fn emit_constant(
&self,
ctx: &mut dyn Definer,
docs: &'_ [&'_ str],
name: &str,
ty: &dyn PhantomCType,
skip_type: bool,
value: &dyn Debug
) -> Result<()>;
// Provided methods
fn language_name(&self) -> &'static str { ... }
fn supports_type_aliases(
&self
) -> Option<&dyn HeaderLanguageSupportingTypeAliases> { ... }
fn emit_docs(
&self,
_ctx: &mut dyn Definer,
_docs: &'_ [&'_ str],
_indentation: &Indentation
) -> Result<()> { ... }
}
Available on crate feature
headers
only.