api

decode.ch

Declarations in decode.ch

12 declarationsjson

Declarations

Public only
JsonDecoder#
Publicstruct
struct JsonDecoder { var value : &JsonValue }
===== Decoder (owned-copy approach) =====
__non_gen_se_repl#
Publicfunction
func __non_gen_se_repl(value : &SerializationError, repl : SerializationError) : SerializationError
deliberately NON-GENERIC helper used by the #json compiler plugin's generated
take_ok#
Publicfunction
func take_ok<T>(t : &Result<T, SerializationError>) : T
Ok payload with a pattern match, because a pattern-bound value cannot be
se_err#
Publicfunction
func se_err(message : string_view) : SerializationError
shared error constructor: most decode errors are a plain generic
JsonArrayDecoder#
Publicstruct
struct JsonArrayDecoder { var elements : span<JsonValue> var index : u64 }
===== JsonArrayDecoder =====
JsonObjectDecoder#
Publicstruct
struct JsonObjectDecoder { var iterator : ordered_map_iterator<string, JsonValue> var _total : u64 }
===== JsonObjectDecoder =====
TypeDecoder#
Publicstruct
struct TypeDecoder<T> { var decoder : &JsonDecoder }
placeholder struct that allows dispatching methods to different types
__decode_dispatch_1#
Publicfunction
func __decode_dispatch_1<T, K>(k : &K) : Result<T, SerializationError>
generic-dispatch internals: JsonDecoder.decode() routes through
__decode_dispatch_2#
Publicfunction
func __decode_dispatch_2<T, K>(t : &TypeDecoder<T>) : Result<T, SerializationError>
decode#
PublicfunctionExtension
func decode<T>(decoder : &JsonDecoder) : Result<T, SerializationError>
JsonMapDecoder#
Publicstruct
struct JsonMapDecoder { var iterator : ordered_map_iterator<string, JsonValue> var _total : u64 }
===== JsonMapDecoder =====
JsonStringDecoder#
Publicstruct
struct JsonStringDecoder { var value : string_view }
===== JsonStringDecoder =====
make#
functionConstructor
func make() : JsonStringDecoder
===== JsonStringDecoder =====