MCPcopy Create free account
hub / github.com/pydantic/jiter / AbstractStringDecoder

Interface AbstractStringDecoder

crates/jiter/src/string_decoder.rs:11–23  ·  view source on GitHub ↗

`'t` is the lifetime of the tape (reusable buffer), `'j` is the lifetime of the JSON data itself data must outlive tape, so if you return data with the lifetime of tape, a slice of data the original JSON data is okay too

Source from the content-addressed store, hash-verified

9/// data must outlive tape, so if you return data with the lifetime of tape,
10/// a slice of data the original JSON data is okay too
11pub trait AbstractStringDecoder<'t, 'j>
12where
13 'j: 't,
14{
15 type Output: std::fmt::Debug;
16
17 fn decode(
18 data: &'j [u8],
19 index: usize,
20 tape: &'t mut Tape,
21 allow_partial: bool,
22 ) -> JsonResult<(Self::Output, usize)>;
23}
24
25pub struct StringDecoder;
26

Callers

nothing calls this directly

Implementers 1

string_decoder.rscrates/jiter/src/string_decoder.rs

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…