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

Method as_bytes

crates/stdlib/src/mmap.rs:869–874  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

867 }
868
869 fn as_bytes(&self) -> BorrowedValue<'_, [u8]> {
870 PyMutexGuard::map_immutable(self.mmap.lock(), |m| {
871 m.as_ref().expect("mmap closed or invalid").as_slice()
872 })
873 .into()
874 }
875
876 fn __len__(&self) -> usize {
877 self.size.load()

Callers 15

create_cursorMethod · 0.45
format_specMethod · 0.45
tcsetattrFunction · 0.45
load_verify_locationsMethod · 0.45
load_client_ca_listFunction · 0.45
_initMethod · 0.45
getaddrinfoFunction · 0.45
get_addrFunction · 0.45
watchdog_threadFunction · 0.45
do_subFunction · 0.45
do_matchFunction · 0.45

Calls 3

lockMethod · 0.45
as_sliceMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected