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

Method borrow_bytes

crates/vm/src/function/buffer.rs:157–162  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

155
156impl ArgStrOrBytesLike {
157 pub fn borrow_bytes(&self) -> BorrowedValue<'_, [u8]> {
158 match self {
159 Self::Buf(b) => b.borrow_buf(),
160 Self::Str(s) => s.as_bytes().into(),
161 }
162 }
163}
164
165#[derive(Debug)]

Callers 6

rand_addFunction · 0.80
extract_addressMethod · 0.80
fcntlFunction · 0.80
ioctlFunction · 0.80
compileFunction · 0.80
evalFunction · 0.80

Calls 2

borrow_bufMethod · 0.45
as_bytesMethod · 0.45

Tested by

no test coverage detected