pub struct HybridFileSpec {
pub namespace: Option<String>,
pub consts: Vec<HybridConstSpec>,
pub aliases: Vec<HybridAliasSpec>,
pub enums: Vec<HybridEnumSpec>,
pub structs: Vec<HybridStructSpec>,
pub modules: Vec<HybridModuleSpec>,
pub views: Vec<HybridViewSpec>,
pub c_functions: Vec<HybridMethodSpec>,
}Expand description
Complete parsed or programmatically constructed Hybrid FFI specification file.
Fields§
§namespace: Option<String>§consts: Vec<HybridConstSpec>§aliases: Vec<HybridAliasSpec>§enums: Vec<HybridEnumSpec>§structs: Vec<HybridStructSpec>§modules: Vec<HybridModuleSpec>§views: Vec<HybridViewSpec>§c_functions: Vec<HybridMethodSpec>Implementations§
Source§impl HybridFileSpec
impl HybridFileSpec
pub fn find_struct(&self, name: &str) -> Option<&HybridStructSpec>
pub fn find_enum(&self, name: &str) -> Option<&HybridEnumSpec>
Sourcepub fn stem_pascal(&self) -> String
pub fn stem_pascal(&self) -> String
PascalCase stem used for generated filenames (<Stem>HybridAbi.h, <Stem>HybridSpec.swift, etc.).
Sourcepub fn stem_snake(&self) -> String
pub fn stem_snake(&self) -> String
snake_case stem used for Rust/Dart/TS generated filenames (<stem>_hybrid.rs, etc.).
Sourcepub fn android_package(&self) -> String
pub fn android_package(&self) -> String
Java/Kotlin package name derived from namespace.
Dotted namespaces (e.g. "io.github.nativeview.components") are kept verbatim; single-segment
namespaces (e.g. "acme_media") are scoped under "io.github.nativeview.<snake>"; omitted namespaces
default to "io.github.nativeview.components".
Sourcepub fn file_schema_hash(&self) -> u64
pub fn file_schema_hash(&self) -> u64
Deterministic file-wide 64-bit schema hash covering all items in order.
Sourcepub fn structs_topological(&self) -> Vec<&HybridStructSpec>
pub fn structs_topological(&self) -> Vec<&HybridStructSpec>
Returns all structs in topological dependency order (dependencies emitted before dependents so C11/C++20 structs that embed POD structs by value always compile cleanly).
Sourcepub fn pod_option_uses(
&self,
scope: PodOptionScope,
) -> impl Iterator<Item = (Cow<'static, str>, &HybridType)>
pub fn pod_option_uses( &self, scope: PodOptionScope, ) -> impl Iterator<Item = (Cow<'static, str>, &HybridType)>
Every (suffix, inner) use of a C option NvHybridOpt<suffix>: an Option<T> of a POD
T as a parameter, return, or Result ok type of a method in scope. Two uses may share a
suffix; validation rejects two different inners on one suffix.
Sourcepub fn collect_pod_option_types(
&self,
scope: PodOptionScope,
) -> Vec<(Cow<'static, str>, HybridType)>
pub fn collect_pod_option_types( &self, scope: PodOptionScope, ) -> Vec<(Cow<'static, str>, HybridType)>
The distinct C options NvHybridOpt<suffix> of scope, by suffix.
Trait Implementations§
Source§impl Clone for HybridFileSpec
impl Clone for HybridFileSpec
Source§fn clone(&self) -> HybridFileSpec
fn clone(&self) -> HybridFileSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more