MCPcopy Create free account
hub / github.com/RustPython/RustPython / set

Method set

crates/vm/src/function/getset.rs:169–173  ·  view source on GitHub ↗
(&self, obj: PyObjectRef, value: PySetterValue, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

167 R: IntoPyNoResult,
168{
169 fn set(&self, obj: PyObjectRef, value: PySetterValue, vm: &VirtualMachine) -> PyResult<()> {
170 let obj = T::try_from_object(vm, obj)?;
171 let value = V::from_setter_value(vm, value)?;
172 (self)(obj, value, vm).into_noresult()
173 }
174}
175
176impl<F, S, V, R> IntoPySetterFunc<(BorrowedParam<S>, V, R, VirtualMachine)> for F

Callers 1

into_setterMethod · 0.45

Calls 1

into_noresultMethod · 0.80

Tested by

no test coverage detected