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

Method try_from_borrowed_object

crates/vm/src/convert/try_from.rs:108–110  ·  view source on GitHub ↗
(vm: &VirtualMachine, value: &'a PyObject)

Source from the content-addressed store, hash-verified

106
107impl<'a, T: 'a + TryFromObject> TryFromBorrowedObject<'a> for Vec<T> {
108 fn try_from_borrowed_object(vm: &VirtualMachine, value: &'a PyObject) -> PyResult<Self> {
109 vm.extract_elements_with(value, |obj| T::try_from_object(vm, obj))
110 }
111}
112
113impl<'a, T: PyPayload> TryFromBorrowedObject<'a> for &'a Py<T> {

Callers

nothing calls this directly

Calls 7

extract_elements_withMethod · 0.80
fast_isinstanceMethod · 0.80
ok_or_elseMethod · 0.80
downcast_refMethod · 0.80
ErrClass · 0.50

Tested by

no test coverage detected