Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/RustPython/RustPython
/ as_bytes
Method
as_bytes
crates/vm/src/builtins/str.rs:474–476 ·
view source on GitHub ↗
(&self)
Source
from the content-addressed store, hash-verified
472
}
473
474
pub const fn as_bytes(&self) -> &[u8] {
475
self.data.as_wtf8().as_bytes()
476
}
477
478
pub fn to_str(&self) -> Option<&str> {
479
self.data.as_str()
Callers
15
try_int
Method · 0.45
repeat
Method · 0.45
_contains
Method · 0.45
_compute_hash
Method · 0.45
split
Method · 0.45
strip
Method · 0.45
py_split_whitespace
Method · 0.45
py_rsplit_whitespace
Method · 0.45
from_bytes
Method · 0.45
endswith
Method · 0.45
startswith
Method · 0.45
py_new
Method · 0.45
Calls
2
as_wtf8
Method · 0.45
as_str
Method · 0.45
Tested by
no test coverage detected