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

Method as_contiguous

crates/vm/src/protocol/buffer.rs:55–59  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

53 }
54
55 pub fn as_contiguous(&self) -> Option<BorrowedValue<'_, [u8]>> {
56 self.desc
57 .is_contiguous()
58 .then(|| unsafe { self.contiguous_unchecked() })
59 }
60
61 pub fn as_contiguous_mut(&self) -> Option<BorrowedValueMut<'_, [u8]>> {
62 (!self.desc.readonly && self.desc.is_contiguous())

Callers 14

WriteFileMethod · 0.45
WSASendMethod · 0.45
WSASendToMethod · 0.45
ass_subscriptMethod · 0.45
buffer_to_ptr_lenFunction · 0.45
fromhex_objectMethod · 0.45
concatMethod · 0.45
try_bytes_likeMethod · 0.45
append_toMethod · 0.45
contiguous_or_collectMethod · 0.45
get_frozen_objectFunction · 0.45
loadsFunction · 0.45

Calls 3

is_contiguousMethod · 0.80
contiguous_uncheckedMethod · 0.80
thenMethod · 0.45

Tested by

no test coverage detected