fusen-rs 0.8.11

RPC framework for service registration and discovery through API exposure, compatible with Dubbo3 protocol, intertunable with Java projects
Documentation
use std::collections::LinkedList;

use crate::error::FusenError;
use bytes::Bytes;
use serde_json::Value;

pub mod json;
pub mod triple;

pub trait RequestBodyCodec {
    fn encode(&self, bodys: LinkedList<Value>) -> Result<Bytes, FusenError>;

    fn decode(&self, bytes: Bytes) -> Result<LinkedList<Value>, FusenError>;
}

pub trait ResponseBodyCodec {
    fn encode(&self, body: Value) -> Result<Bytes, FusenError>;

    fn decode(&self, bytes: Bytes) -> Result<Value, FusenError>;
}