API · struct
Config
pub(all) struct Config {
xlang : Bool
track_ref : Bool
check_string : Bool
depth : Int32
fields : Int32
graph : Int32
}What a reader will accept and what a writer will send.
Every default here is the Rust fory crate's Config::default(), because that is the reference implementation the specification names first, and because a default nobody else shares is a default an interop test finds. Where this package has no counterpart for one of its knobs — the schema version check, the type-meta cache — the knob is absent rather than inert.
Fields
| Field | Meaning |
|---|---|
xlang : Bool | Whether the header byte carries the cross-language flag. The xlang format is the one implemented here, so this is |
track_ref : Bool | Whether values that are written more than once, or that take part in a cycle, are sent once and pointed at afterwards. Off by default, as in the Rust crate: reference tracking costs a byte per tracked value and a table on both sides, which a graph without sharing should not pay for. Turn it on and mark the shared nodes with |
check_string : Bool | Whether the bytes of a string are checked as UTF-8 before they become a On by default, as in the Rust crate. Turning it off is a promise that the peer is trusted, not a way to read a string that is not one. |
depth : Int32 | How deeply values may nest before a message is refused. Five is the Rust crate's |
fields : Int32 | How many fields a struct may declare before a message is refused. Five hundred and twelve is the Rust crate's |
graph : Int32 | How many bytes of variable-length payload one message may declare before it is refused: strings, binaries, dense arrays and container bodies added up as they are read. A hundred and twenty-eight mebibytes is the Rust crate's |
Methods
new
fn Config::new(xlang? : Bool, track_ref? : Bool, check_string? : Bool, depth? : Int32, fields? : Int32, graph? : Int32) -> Self
The same preset, one argument at a time.
For when several parts differ at once and a record update would mean spelling the ones that did not change.
Generated from src/pkg.generated.mbti and the doc comments beside this declaration.