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

Method handle_decode_error

crates/common/src/encodings.rs:280–287  ·  view source on GitHub ↗
(
            &self,
            ctx: &mut Ctx,
            byte_range: Range<usize>,
            reason: Option<&str>,
        )

Source from the content-addressed store, hash-verified

278
279 impl<Ctx: DecodeContext> DecodeErrorHandler<Ctx> for Strict {
280 fn handle_decode_error(
281 &self,
282 ctx: &mut Ctx,
283 byte_range: Range<usize>,
284 reason: Option<&str>,
285 ) -> Result<(Ctx::StrBuf, usize), Ctx::Error> {
286 Err(ctx.error_decoding(byte_range, reason))
287 }
288 }
289
290 #[derive(Clone, Copy)]

Callers 1

handle_errorMethod · 0.45

Calls 9

error_decodingMethod · 0.80
to_stringMethod · 0.80
full_dataMethod · 0.80
ErrClass · 0.50
stringMethod · 0.45
cloneMethod · 0.45
lenMethod · 0.45
unwrapMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected