This is an automated email from the ASF dual-hosted git repository.

chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fory-site.git


The following commit(s) were added to refs/heads/main by this push:
     new 3e0ebd0d6 πŸ”„ synced local 'docs/guide/' with remote 'docs/guide/'
3e0ebd0d6 is described below

commit 3e0ebd0d6dad1094ab3de69e3a8654394f605949
Author: chaokunyang <[email protected]>
AuthorDate: Mon Oct 13 20:29:03 2025 +0000

    πŸ”„ synced local 'docs/guide/' with remote 'docs/guide/'
---
 docs/guide/rust_guide.md | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/docs/guide/rust_guide.md b/docs/guide/rust_guide.md
index 9513c8f36..919124227 100644
--- a/docs/guide/rust_guide.md
+++ b/docs/guide/rust_guide.md
@@ -325,7 +325,6 @@ Apache Foryβ„’ supports polymorphic serialization through 
trait objects, enablin
 use fory::{Fory, register_trait_type};
 use fory::Serializer;
 use fory::ForyObject;
-use fory::Mode;
 
 trait Animal: Serializer {
     fn speak(&self) -> String;
@@ -356,7 +355,7 @@ struct Zoo {
     star_animal: Box<dyn Animal>,
 }
 
-let mut fory = Fory::default().mode(Mode::Compatible);
+let mut fory = Fory::default().compatible(true);
 fory.register::<Dog>(100);
 fory.register::<Cat>(101);
 fory.register::<Zoo>(102);
@@ -445,7 +444,7 @@ struct AnimalShelter {
     registry: HashMap<String, Arc<dyn Animal>>,
 }
 
-let mut fory = Fory::default().mode(Mode::Compatible);
+let mut fory = Fory::default().compatible(true);
 fory.register::<Dog>(100);
 fory.register::<Cat>(101);
 fory.register::<AnimalShelter>(102);
@@ -530,7 +529,6 @@ Apache Foryβ„’ supports schema evolution in **Compatible 
mode**, allowing serial
 
 ```rust
 use fory::Fory;
-use fory::Mode;
 use fory::ForyObject;
 use std::collections::HashMap;
 
@@ -551,10 +549,10 @@ struct PersonV2 {
     metadata: HashMap<String, String>,
 }
 
-let mut fory1 = Fory::default().mode(Mode::Compatible);
+let mut fory1 = Fory::default().compatible(true);
 fory1.register::<PersonV1>(1);
 
-let mut fory2 = Fory::default().mode(Mode::Compatible);
+let mut fory2 = Fory::default().compatible(true);
 fory2.register::<PersonV2>(1);
 
 let person_v1 = PersonV1 {
@@ -809,11 +807,10 @@ Apache Foryβ„’ supports seamless data exchange across 
multiple languages:
 
 ```rust
 use fory::Fory;
-use fory::Mode;
 
 // Enable cross-language mode
 let mut fory = Fory::default()
-    .mode(Mode::Compatible)
+    .compatible(true)
     .xlang(true);
 
 // Register types with consistent IDs across languages
@@ -907,9 +904,7 @@ let fory = Fory::default(); // SchemaConsistent by default
 Allows independent schema evolution:
 
 ```rust
-use fory::Mode;
-
-let fory = Fory::default().mode(Mode::Compatible);
+let fory = Fory::default().compatible(true);
 ```
 
 ## βš™οΈ Configuration


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to