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

Method name_inner

crates/vm/src/builtins/type.rs:1161–1171  ·  view source on GitHub ↗
(
        &'a self,
        static_f: impl FnOnce(&'static str) -> R,
        heap_f: impl FnOnce(&'a HeapTypeExt) -> R,
    )

Source from the content-addressed store, hash-verified

1159 }
1160
1161 fn name_inner<'a, R: 'a>(
1162 &'a self,
1163 static_f: impl FnOnce(&'static str) -> R,
1164 heap_f: impl FnOnce(&'a HeapTypeExt) -> R,
1165 ) -> R {
1166 if let Some(ref ext) = self.heaptype_ext {
1167 heap_f(ext)
1168 } else {
1169 static_f(self.slots.name)
1170 }
1171 }
1172
1173 pub fn slot_name(&self) -> BorrowedValue<'_, str> {
1174 self.name_inner(

Callers 3

slot_nameMethod · 0.80
nameMethod · 0.80
__name__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected