MCPcopy Create free account
hub / github.com/bytecodealliance/wit-bindgen / start_new_file

Method start_new_file

crates/cpp/src/lib.rs:442–452  ·  view source on GitHub ↗
(&mut self, condition: Option<bool>)

Source from the content-addressed store, hash-verified

440 }
441
442 fn start_new_file(&mut self, condition: Option<bool>) -> FileContext {
443 if condition == Some(true) || self.opts.split_interfaces {
444 FileContext {
445 includes: std::mem::take(&mut self.includes),
446 src: std::mem::take(&mut self.h_src),
447 dependencies: std::mem::take(&mut self.dependencies),
448 }
449 } else {
450 Default::default()
451 }
452 }
453
454 fn finish_file(&mut self, namespace: &[String], store: FileContext) {
455 if !store.src.src.is_empty() {

Callers 3

import_interfaceMethod · 0.80
export_interfaceMethod · 0.80
type_resourceMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected