pub struct Config {
pub compatible: bool,
pub xlang: bool,
pub share_meta: bool,
pub compress_string: bool,
pub max_dyn_depth: u32,
pub check_struct_version: bool,
pub track_ref: bool,
}Expand description
Configuration for Fory serialization.
This struct holds all the configuration options that control how Fory
serializes and deserializes data. It is shared between the main Fory
instance and the WriteContext/ReadContext to ensure consistent behavior.
Fields§
§compatible: boolWhether compatible mode is enabled for schema evolution support.
xlang: boolWhether cross-language serialization is enabled.
Whether metadata sharing is enabled.
compress_string: boolWhether meta string compression is enabled.
max_dyn_depth: u32Maximum depth for nested dynamic object serialization.
check_struct_version: boolWhether class version checking is enabled.
track_ref: boolWhether reference tracking is enabled. When enabled, shared references and circular references are tracked and preserved during serialization/deserialization.
Implementations§
Source§impl Config
impl Config
Sourcepub fn is_compatible(&self) -> bool
pub fn is_compatible(&self) -> bool
Check if compatible mode is enabled.
Check if meta sharing is enabled.
Sourcepub fn is_compress_string(&self) -> bool
pub fn is_compress_string(&self) -> bool
Check if string compression is enabled.
Sourcepub fn max_dyn_depth(&self) -> u32
pub fn max_dyn_depth(&self) -> u32
Get maximum dynamic depth.
Sourcepub fn is_check_struct_version(&self) -> bool
pub fn is_check_struct_version(&self) -> bool
Check if class version checking is enabled.
Sourcepub fn is_track_ref(&self) -> bool
pub fn is_track_ref(&self) -> bool
Check if reference tracking is enabled.