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? : @moonknob.Wins, clash? : @moonknob.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 whose value differs from the record's is what clash arbitrates: taken by wins silently or with a warning, aborted on, or handed to the caller's function.
Generated from src/pkg.generated.mbti and the doc comments beside this declaration.