(
&self,
input: PyObjectRef,
_final: OptionalArg<bool>,
vm: &VirtualMachine,
)
| 2691 | impl StatelessIncrementalDecoder { |
| 2692 | #[pymethod] |
| 2693 | fn decode( |
| 2694 | &self, |
| 2695 | input: PyObjectRef, |
| 2696 | _final: OptionalArg<bool>, |
| 2697 | vm: &VirtualMachine, |
| 2698 | ) -> PyResult { |
| 2699 | let mut args: Vec<PyObjectRef> = vec![input]; |
| 2700 | if let Some(errors) = &self.errors { |
| 2701 | args.push(errors.to_owned().into()); |
| 2702 | } |
| 2703 | let res = self.decode.call(args, vm)?; |
| 2704 | let tuple: PyTupleRef = res.try_into_value(vm)?; |
| 2705 | if tuple.len() != 2 { |
| 2706 | return Err(vm.new_type_error("decoder must return a tuple (object, integer)")); |
| 2707 | } |
| 2708 | Ok(tuple[0].clone()) |
| 2709 | } |
| 2710 | |
| 2711 | #[pymethod] |
| 2712 | fn getstate(&self, vm: &VirtualMachine) -> (PyBytesRef, u64) { |
nothing calls this directly
no test coverage detected