MCPcopy Create free account
hub / github.com/dgrunwald/rust-cpython / from

Method from

src/objects/string.rs:126–128  ·  view source on GitHub ↗
(val: &'a str)

Source from the content-addressed store, hash-verified

124impl<'a> From<&'a str> for PyStringData<'a> {
125 #[inline]
126 fn from(val: &'a str) -> PyStringData<'a> {
127 PyStringData::Utf8(val.as_bytes())
128 }
129}
130
131impl<'a> From<&'a [u16]> for PyStringData<'a> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected