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

Method hex

crates/vm/src/bytes_inner.rs:427–434  ·  view source on GitHub ↗
(
        &self,
        sep: OptionalArg<Either<PyStrRef, PyBytesRef>>,
        bytes_per_sep: OptionalArg<isize>,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

425 }
426
427 pub fn hex(
428 &self,
429 sep: OptionalArg<Either<PyStrRef, PyBytesRef>>,
430 bytes_per_sep: OptionalArg<isize>,
431 vm: &VirtualMachine,
432 ) -> PyResult<String> {
433 bytes_to_hex(self.elements.as_slice(), sep, bytes_per_sep, vm)
434 }
435
436 pub fn fromhex(bytes: &[u8], vm: &VirtualMachine) -> PyResult<Vec<u8>> {
437 let mut iter = bytes.iter().enumerate();

Callers

nothing calls this directly

Calls 2

bytes_to_hexFunction · 0.85
as_sliceMethod · 0.45

Tested by

no test coverage detected