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

Method as_str

crates/wtf8/src/lib.rs:860–862  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

858 /// This does not copy the data.
859 #[inline]
860 pub const fn as_str(&self) -> Result<&str, str::Utf8Error> {
861 str::from_utf8(&self.bytes)
862 }
863
864 /// Creates an owned `Wtf8Buf` from a borrowed `Wtf8`.
865 pub fn to_wtf8_buf(&self) -> Wtf8Buf {

Callers 15

evalFunction · 0.45
criterion_benchmarkFunction · 0.45
benchmark_pystoneFunction · 0.45
mainFunction · 0.45
compileMethod · 0.45
impl_pyclassFunction · 0.45
gen_impl_itemMethod · 0.45
attrs_to_content_itemsFunction · 0.45
from_nestedMethod · 0.45
class_nameMethod · 0.45

Calls

no outgoing calls

Tested by 2

compileMethod · 0.36