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

Method as_ref

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

Source from the content-addressed store, hash-verified

1006
1007impl AnyStrWrapper<[u8]> for PyBytesInner {
1008 fn as_ref(&self) -> Option<&[u8]> {
1009 Some(&self.elements)
1010 }
1011
1012 fn is_empty(&self) -> bool {
1013 self.elements.is_empty()

Callers 1

bytes_decodeFunction · 0.45

Calls 1

SomeClass · 0.50

Tested by

no test coverage detected