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

Method try_from_borrowed_object

crates/vm/src/bytes_inner.rs:38–40  ·  view source on GitHub ↗
(vm: &VirtualMachine, obj: &'a PyObject)

Source from the content-addressed store, hash-verified

36
37impl<'a> TryFromBorrowedObject<'a> for PyBytesInner {
38 fn try_from_borrowed_object(vm: &VirtualMachine, obj: &'a PyObject) -> PyResult<Self> {
39 bytes_from_object(vm, obj).map(Self::from)
40 }
41}
42
43#[derive(FromArgs)]

Callers

nothing calls this directly

Calls 2

bytes_from_objectFunction · 0.85
mapMethod · 0.45

Tested by

no test coverage detected