bindgen: snap

This commit is contained in:
nym21
2026-03-16 10:46:49 +01:00
parent f1c0435bce
commit ad51280e51
7 changed files with 41 additions and 42 deletions
+8
View File
@@ -93,6 +93,14 @@ pub trait LanguageSyntax {
/// - Rust: `TypeName::new`
fn constructor_name(&self, type_name: &str) -> String;
/// Return a variable as an owned value expression.
///
/// - Rust: `var.clone()` (String needs explicit cloning)
/// - JavaScript/Python: `var` (no ownership)
fn owned_expr(&self, var: &str) -> String {
var.to_string()
}
/// Format a discriminator argument for passing to a templated child.
///
/// Returns an expression computing the disc value from a template.