API · fn
loads
pub fn[T : Codec] loads(Bytes, schemas? : Array[StructMeta], config? : Config, xlang? : Bool, track_ref? : Bool, check_string? : Bool, depth? : Int32, fields? : Int32, graph? : Int32, wins? : Wins, clash? : OnClash[Config]) -> T raise
Bytes as a value: the head is checked, the value is read, and the bytes left over are refused, because a message with two values in it is two messages.
schemas is what the reader knows about structs: a struct arrives as a user type ID and nothing else. The configuration is the record, then this call's flat mirrors: the library preset is beaten by the record, and the record by the flat mirrors, unless wins says otherwise. A flat mirror that contradicts the record beside it is what clash arbitrates: taken silently by wins, refused, or handed to the caller's function as (the record, the two as one).
Generated from src/pkg.generated.mbti and the doc comments beside this declaration.