dubbo-rs-serialization
Serialization abstraction for Apache Dubbo Rust — defines a Serialization trait that serves as a thin abstraction over wire-format encoding.
Installation
Add this to your Cargo.toml:
[]
= "0.1"
Or use cargo add:
Key Public Types
Serialization trait
| Method | Description |
|---|---|
content_type() |
Returns the MIME type for this serialization format |
serialize(&[u8]) |
Encode raw bytes into wire-format payload |
deserialize(&[u8]) |
Decode wire-format payload back to raw bytes |
Re-exports
pub use dubbo_rs_common as common— access to URL, Node, constants, etc.
Implementations
This trait is implemented by:
- dubbo-serialization-protobuf —
"application/grpc+proto"(byte pass-through) - dubbo-serialization-hessian2 — Hessian2 binary encoding
- dubbo-serialization-json — JSON encoding via
serde_json
Example
use Serialization;
// Implement a custom serialization
;
License
Apache-2.0