MCPcopy Index your code
hub / github.com/RustPython/RustPython / simple_name

Method simple_name

crates/derive-impl/src/util.rs:285–290  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

283 fn inner(&self) -> &ItemMetaInner;
284
285 fn simple_name(&self) -> Result<String> {
286 let inner = self.inner();
287 Ok(inner
288 ._optional_str("name")?
289 .unwrap_or_else(|| inner.item_name()))
290 }
291
292 fn optional_name(&self) -> Option<String> {
293 self.inner()._optional_str("name").ok().flatten()

Callers 3

gen_impl_itemMethod · 0.80
impl_pymoduleFunction · 0.80
gen_module_itemMethod · 0.80

Implementers 3

pyclass.rscrates/derive-impl/src/pyclass.rs
util.rscrates/derive-impl/src/util.rs
pystructseq.rscrates/derive-impl/src/pystructseq.rs

Calls 3

_optional_strMethod · 0.80
item_nameMethod · 0.80
innerMethod · 0.45

Tested by

no test coverage detected