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

Method uses_two_names

crates/rust/src/interface.rs:2465–2481  ·  view source on GitHub ↗
(&self, info: &TypeInfo)

Source from the content-addressed store, hash-verified

2463 }
2464
2465 fn uses_two_names(&self, info: &TypeInfo) -> bool {
2466 // Types are only duplicated if explicitly requested ...
2467 matches!(
2468 self.r#gen.opts.ownership,
2469 Ownership::Borrowing {
2470 duplicate_if_necessary: true
2471 }
2472 )
2473 // ... and if they're both used in a borrowed/owned context
2474 && info.borrowed
2475 && info.owned
2476 // ... and they have a list ...
2477 && info.has_list
2478 // ... and if there's NOT an `own` handle since those are always
2479 // done by ownership.
2480 && !info.has_own_handle
2481 }
2482
2483 fn path_to_interface(&self, interface: InterfaceId) -> Option<String> {
2484 let Some(InterfaceName { path, remapped }) = &self.r#gen.interface_names.get(&interface)

Callers 4

type_mode_for_idMethod · 0.80
modes_ofMethod · 0.80
param_nameMethod · 0.80
result_nameMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected