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

Method new

crates/stdlib/src/_sqlite3.rs:432–437  ·  view source on GitHub ↗
(obj: PyObjectRef, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

430
431 impl CallbackData {
432 fn new(obj: PyObjectRef, vm: &VirtualMachine) -> Option<Self> {
433 (!vm.is_none(&obj)).then_some(Self {
434 obj: obj.into_raw(),
435 vm,
436 })
437 }
438
439 fn retrieve(&self) -> (&PyObject, &VirtualMachine) {
440 unsafe { (self.obj.as_ref(), &*self.vm) }

Callers

nothing calls this directly

Calls 15

newFunction · 0.85
lstrip_sqlFunction · 0.85
db_lockMethod · 0.80
sql_limitMethod · 0.80
to_bytesMethod · 0.80
eq_ignore_ascii_caseMethod · 0.80
SomeClass · 0.50
ErrClass · 0.50
is_noneMethod · 0.45
into_rawMethod · 0.45
containsMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected