pub fn generate_with_config(
module: &Module,
config: CodeGenConfig,
) -> Result<String, Error>Expand description
Generate Rust code from an ASN.1 module with custom configuration.
§Configuration options
string_type_mode— choose between owned heap-allocating types (OctetString,BitString, …) and zero-copy borrowed types (OctetStringRef<'a>,BitStringRef<'a>, …). SeeStringTypeMode.module_path_prefix— emituse <prefix>::<module>::Type;statements instead of comment-only import annotations. SeeCodeGenConfig::with_crate_imports,CodeGenConfig::with_super_imports,CodeGenConfig::with_custom_prefix.use_core— emitcore::convert::TryFrominstead ofstd::convert::TryFromfor#![no_std]environments.skip_imported_types/imported_type_lifetimes— fine-grained control over which imported types are emitted and which carry a lifetime.