pub struct ApiSurface {
pub crate_name: String,
pub version: String,
pub types: Vec<TypeDef>,
pub functions: Vec<FunctionDef>,
pub enums: Vec<EnumDef>,
pub errors: Vec<ErrorDef>,
pub excluded_type_paths: HashMap<String, String>,
pub excluded_trait_names: HashSet<String>,
}Expand description
Complete API surface extracted from a Rust crate’s public interface.
Fields§
§crate_name: String§version: String§types: Vec<TypeDef>§functions: Vec<FunctionDef>§enums: Vec<EnumDef>§errors: Vec<ErrorDef>§excluded_type_paths: HashMap<String, String>Type names → fully qualified rust_paths for types that were extracted but
then excluded from the public binding surface. Preserved so trait_bridge
codegen can still reference them by qualified path when they appear in
trait method signatures (e.g. Renderer::render(&InternalDocument)).
excluded_trait_names: HashSet<String>Subset of excluded_type_paths keys whose underlying definition is a trait
(is_trait = true on the original TypeDef). The is_trait flag is lost
when the type is stripped, so trait-bridge codegen tracks excluded traits
separately to decide whether a return-type Named(name) referencing an
excluded item is a non-bridgeable trait object (skip the method, fall back
to default impl) or a struct/enum still usable via its qualified path.
Trait Implementations§
Source§impl Clone for ApiSurface
impl Clone for ApiSurface
Source§fn clone(&self) -> ApiSurface
fn clone(&self) -> ApiSurface
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more