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

Method to_wtf8_buf

crates/wtf8/src/lib.rs:865–869  ·  view source on GitHub ↗

Creates an owned `Wtf8Buf` from a borrowed `Wtf8`.

(&self)

Source from the content-addressed store, hash-verified

863
864 /// Creates an owned `Wtf8Buf` from a borrowed `Wtf8`.
865 pub fn to_wtf8_buf(&self) -> Wtf8Buf {
866 Wtf8Buf {
867 bytes: self.bytes.to_vec(),
868 }
869 }
870
871 /// Lossily converts the string to UTF-8.
872 /// Returns a UTF-8 `&str` slice if the contents are well-formed in UTF-8.

Callers 1

to_ownedMethod · 0.80

Calls 1

to_vecMethod · 0.80

Tested by

no test coverage detected