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

Method as_bytes

crates/vm/src/bytes_inner.rs:232–234  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

230impl PyBytesInner {
231 #[inline]
232 pub fn as_bytes(&self) -> &[u8] {
233 &self.elements
234 }
235
236 fn new_repr_overflow_error(vm: &VirtualMachine) -> PyBaseExceptionRef {
237 vm.new_overflow_error("bytes object is too large to make repr")

Callers 15

to_cstringMethod · 0.45
ensure_no_nulMethod · 0.45
pack_charFunction · 0.45
__setstate__Method · 0.45
basenameMethod · 0.45
py_bytes_splitlinesMethod · 0.45
py_zfillMethod · 0.45
handle_encode_errorMethod · 0.45
key_hashMethod · 0.45
key_eqMethod · 0.45
calculate_suggestionsFunction · 0.45
spec_format_bytesFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected