Sets the serialization compatible mode for this Fory builder. # Arguments `compatible` - The serialization compatible mode to use. Options are: - `false`: Every reader and writer must use the same schema. Use only for smaller, faster same-schema payloads. - `true`: Supports schema evolution and type metadata sharing for better cross-version compatibility. # Returns Returns `self` for method ch
(mut self, compatible: bool)
| 93 | /// let fory = Fory::builder().compatible(false).build(); |
| 94 | /// ``` |
| 95 | pub fn compatible(mut self, compatible: bool) -> Self { |
| 96 | self.compatible_set = true; |
| 97 | // Setting share_meta individually is not supported currently |
| 98 | self.config.share_meta = compatible; |
| 99 | self.config.compatible = compatible; |
| 100 | if compatible { |
| 101 | self.config.check_struct_version = false; |
| 102 | } else if self.config.xlang { |
| 103 | self.config.check_struct_version = true; |
| 104 | } |
| 105 | self |
| 106 | } |
| 107 | |
| 108 | /// Enables or disables xlang mode. |
| 109 | /// |
no outgoing calls