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

Method is_compatible_with

crates/common/src/encodings.rs:9–16  ·  view source on GitHub ↗
(&self, kind: StrKind)

Source from the content-addressed store, hash-verified

7
8pub trait StrBuffer: AsRef<Wtf8> {
9 fn is_compatible_with(&self, kind: StrKind) -> bool {
10 let s = self.as_ref();
11 match kind {
12 StrKind::Ascii => s.is_ascii(),
13 StrKind::Utf8 => s.is_utf8(),
14 StrKind::Wtf8 => true,
15 }
16 }
17}
18
19pub trait CodecContext: Sized {

Callers 1

encode_utf8_compatibleFunction · 0.45

Implementers 1

codecs.rscrates/vm/src/codecs.rs

Calls 3

as_refMethod · 0.45
is_asciiMethod · 0.45
is_utf8Method · 0.45

Tested by

no test coverage detected