MCPcopy Create free account
hub / github.com/apache/fory / get_module_name

Method get_module_name

compiler/fory_compiler/generators/rust.py:471–477  ·  view source on GitHub ↗

Get the Rust module name.

(self)

Source from the content-addressed store, hash-verified

469 return files
470
471 def get_module_name(self) -> str:
472 """Get the Rust module name."""
473 module_name = self.get_top_level_module_identifier(self.package)
474 # e.g., when resolving the file for `pub mod r#type`, Rust looks for `type.rs`, not `r#type.rs`.
475 if module_name.startswith("r#"):
476 return module_name[2:]
477 return module_name
478
479 def is_imported_type(self, type_def: object) -> bool:
480 """Return True if a type definition comes from an imported IDL file."""

Calls 1

Tested by

no test coverage detected