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

Function encode

crates/common/src/encodings.rs:498–504  ·  view source on GitHub ↗
(ctx: Ctx, errors: &E)

Source from the content-addressed store, hash-verified

496
497 #[inline]
498 pub fn encode<Ctx, E>(ctx: Ctx, errors: &E) -> Result<Vec<u8>, Ctx::Error>
499 where
500 Ctx: EncodeContext,
501 E: EncodeErrorHandler<Ctx>,
502 {
503 encode_utf8_compatible(ctx, errors, "surrogates not allowed", StrKind::Utf8)
504 }
505
506 pub fn decode<Ctx: DecodeContext, E: DecodeErrorHandler<Ctx>>(
507 ctx: Ctx,

Callers 3

hexdigestMethod · 0.50
impl_py_compileFunction · 0.50
impl_py_freezeFunction · 0.50

Calls 15

encode_utf8_compatibleFunction · 0.85
newFunction · 0.85
iter_code_pointsFunction · 0.85
remaining_dataMethod · 0.80
restart_fromMethod · 0.80
data_lenMethod · 0.80
code_pointsMethod · 0.80
error_encodingMethod · 0.80
SomeClass · 0.50
ErrClass · 0.50
findMethod · 0.45
is_asciiMethod · 0.45

Tested by

no test coverage detected