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

Method with_ref

crates/vm/src/function/buffer.rs:46–51  ·  view source on GitHub ↗
(&self, f: F)

Source from the content-addressed store, hash-verified

44 }
45
46 pub fn with_ref<F, R>(&self, f: F) -> R
47 where
48 F: FnOnce(&[u8]) -> R,
49 {
50 f(&self.borrow_buf())
51 }
52
53 pub const fn len(&self) -> usize {
54 self.0.desc.len

Callers 15

py_to_jsFunction · 0.80
pack_intoFunction · 0.80
unpackFunction · 0.80
unpack_fromFunction · 0.80
nextMethod · 0.80
pack_intoMethod · 0.80
unpackMethod · 0.80
unpack_fromMethod · 0.80
hexlifyFunction · 0.80
unhexlifyFunction · 0.80
crc32Function · 0.80
crc_hqxFunction · 0.80

Calls 4

fFunction · 0.50
borrow_bufMethod · 0.45
borrow_buf_mutMethod · 0.45
as_bytesMethod · 0.45

Tested by

no test coverage detected