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 6f210a391 πŸ”„ synced local 'docs/docs/guide/' with remote 'docs/guide/'
6f210a391 is described below

commit 6f210a391d670e29c380992d1a8c415500d8b0eb
Author: chaokunyang <[email protected]>
AuthorDate: Sat Nov 1 13:32:49 2025 +0000

    πŸ”„ synced local 'docs/docs/guide/' with remote 'docs/guide/'
---
 docs/docs/guide/rust_guide.md | 35 ++++++++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)

diff --git a/docs/docs/guide/rust_guide.md b/docs/docs/guide/rust_guide.md
index 6729c55a9..cd48656e4 100644
--- a/docs/docs/guide/rust_guide.md
+++ b/docs/docs/guide/rust_guide.md
@@ -609,7 +609,40 @@ let decoded: Status = fory.deserialize(&bytes)?;
 assert_eq!(status, decoded);
 ```
 
-### 6. Custom Serializers
+### 6. Tuple Support
+
+Apache Foryβ„’ supports tuples up to 22 elements out of the box with efficient 
serialization in both compatible and non-compatible modes.
+
+**Features:**
+
+- Automatic serialization for tuples from 1 to 22 elements
+- Heterogeneous type support (each element can be a different type)
+- Schema evolution in Compatible mode (handles missing/extra elements)
+
+**Serialization modes:**
+
+1. **Non-compatible mode**: Serializes elements sequentially without 
collection headers for minimal overhead
+2. **Compatible mode**: Uses collection protocol with type metadata for schema 
evolution
+
+```rust
+use fory::{Fory, Error};
+
+let mut fory = Fory::default();
+
+// Tuple with heterogeneous types
+let data: (i32, String, bool, Vec<i32>) = (
+    42,
+    "hello".to_string(),
+    true,
+    vec![1, 2, 3],
+);
+
+let bytes = fory.serialize(&data)?;
+let decoded: (i32, String, bool, Vec<i32>) = fory.deserialize(&bytes)?;
+assert_eq!(data, decoded);
+```
+
+### 7. Custom Serializers
 
 For types that don't support `#[derive(ForyObject)]`, implement the 
`Serializer` trait manually. This is useful for:
 


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

Reply via email to