pub struct ParamDef {
pub name: String,
pub ty: TypeRef,
pub optional: bool,
pub default: Option<String>,
pub sanitized: bool,
pub typed_default: Option<DefaultValue>,
pub is_ref: bool,
pub is_mut: bool,
pub newtype_wrapper: Option<String>,
pub original_type: Option<String>,
}Expand description
A function/method parameter.
Fields§
§name: String§ty: TypeRef§optional: bool§default: Option<String>§sanitized: boolTrue if this param’s type was sanitized during unknown type resolution.
typed_default: Option<DefaultValue>Typed default value for language-native default emission.
is_ref: boolTrue if the original Rust parameter was a reference (&T).
Used by codegen to generate owned intermediates and pass refs.
is_mut: boolTrue if the original Rust parameter was a mutable reference (&mut T).
Used by codegen to generate &mut refs when calling core functions.
newtype_wrapper: Option<String>Full Rust path of the newtype wrapper that was resolved away for this param,
e.g. "my_crate::NodeIndex" when NodeIndex(u32) was resolved to u32.
When set, codegen must wrap the raw value back into the newtype when calling core:
my_crate::NodeIndex(param) instead of just param.
original_type: Option<String>Original Rust type before sanitization, stored when param.sanitized=true.
Allows codegen to reconstruct proper deserialization logic.
E.g. "Vec<(PathBuf, Option<FileExtractionConfig>)>" when sanitized to Vec<String>.