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

Method encode

crates/vm/src/builtins/str.rs:1475–1477  ·  view source on GitHub ↗
(zelf: PyRef<Self>, args: EncodeArgs, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1473
1474 #[pymethod]
1475 fn encode(zelf: PyRef<Self>, args: EncodeArgs, vm: &VirtualMachine) -> PyResult<PyBytesRef> {
1476 encode_string(zelf, args.encoding, args.errors, vm)
1477 }
1478
1479 #[pymethod]
1480 fn __getnewargs__(zelf: PyRef<Self>, vm: &VirtualMachine) -> PyObjectRef {

Callers

nothing calls this directly

Calls 1

encode_stringFunction · 0.70

Tested by

no test coverage detected