moon/fory Apache Fory · MoonBit

API · fn

dumps

Messages · defined at codec.mbt:560

pub fn[T : Codec] dumps(T, config? : Config, xlang? : Bool, track_ref? : Bool, check_string? : Bool, depth? : Int32, fields? : Int32, graph? : Int32, wins? : Wins, clash? : OnClash[Config]) -> Bytes raise

One value as one message: the head, the type ID, and the value.

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.