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 fdf3a72f4 🔄 synced local 'docs/docs/guide/' with remote 'docs/guide/'
fdf3a72f4 is described below

commit fdf3a72f422571e0a3c11b47769b872327824416
Author: chaokunyang <[email protected]>
AuthorDate: Thu Dec 11 05:38:23 2025 +0000

    🔄 synced local 'docs/docs/guide/' with remote 'docs/guide/'
---
 docs/docs/guide/cpp/basic-serialization.md  | 6 +++---
 docs/docs/guide/rust/basic-serialization.md | 2 +-
 docs/docs/guide/rust/index.md               | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/docs/docs/guide/cpp/basic-serialization.md 
b/docs/docs/guide/cpp/basic-serialization.md
index 83182495e..5d24a926d 100644
--- a/docs/docs/guide/cpp/basic-serialization.md
+++ b/docs/docs/guide/cpp/basic-serialization.md
@@ -114,7 +114,7 @@ if (result.ok()) {
 ```cpp
 // Serialize to existing Buffer (fastest path)
 Buffer buffer;
-auto result = fory.serialize_to(obj, buffer);
+auto result = fory.serialize_to(buffer, obj);
 if (result.ok()) {
   size_t bytes_written = result.value();
   // buffer now contains serialized data
@@ -122,7 +122,7 @@ if (result.ok()) {
 
 // Serialize to existing vector (zero-copy)
 std::vector<uint8_t> output;
-auto result = fory.serialize_to(obj, output);
+auto result = fory.serialize_to(output, obj);
 if (result.ok()) {
   size_t bytes_written = result.value();
   // output now contains serialized data
@@ -225,7 +225,7 @@ fory.register_struct<Outer>(2);
 
 ## Performance Tips
 
-- **Buffer Reuse**: Use `serialize_to(obj, buffer)` with pre-allocated buffers
+- **Buffer Reuse**: Use `serialize_to(buffer, obj)` with pre-allocated buffers
 - **Pre-registration**: Register all types before serialization starts
 - **Single-Threaded**: Use `build()` instead of `build_thread_safe()` when 
possible
 - **Disable Tracking**: Use `track_ref(false)` when references aren't needed
diff --git a/docs/docs/guide/rust/basic-serialization.md 
b/docs/docs/guide/rust/basic-serialization.md
index e62c2bcc3..0c5b622ee 100644
--- a/docs/docs/guide/rust/basic-serialization.md
+++ b/docs/docs/guide/rust/basic-serialization.md
@@ -144,7 +144,7 @@ let decoded: MyStruct = fory.deserialize(&bytes)?;
 
 // Serialize to existing buffer
 let mut buf: Vec<u8> = vec![];
-fory.serialize_to(&obj, &mut buf)?;
+fory.serialize_to(&mut buf, &obj)?;
 
 // Deserialize from reader
 let mut reader = Reader::new(&buf);
diff --git a/docs/docs/guide/rust/index.md b/docs/docs/guide/rust/index.md
index 522fbf3c0..fe4ba0ae5 100644
--- a/docs/docs/guide/rust/index.md
+++ b/docs/docs/guide/rust/index.md
@@ -81,7 +81,7 @@ fn main() -> Result<(), Error> {
 
     // Serialize to specified buffer
     let mut buf: Vec<u8> = vec![];
-    fory.serialize_to(&user, &mut buf)?;
+    fory.serialize_to(&mut buf, &user)?;
     // Deserialize from specified buffer
     let mut reader = Reader::new(&buf);
     let decoded: User = fory.deserialize_from(&mut reader)?;


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

Reply via email to