rubbo-core 0.1.0

Rust implementation of Apache Dubbo 3. High-performance RPC framework with Triple protocol.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pub mod kind;

use std::sync::Arc;
use async_trait::async_trait;
use crate::error::Result;
use crate::rpc::Invoker;
use crate::url::Url;

/// Protocol trait - Entry point for remote communication
#[async_trait]
pub trait RpcProtocol: Send + Sync {
    type Invoker: Invoker;
    
    async fn export(&self, invoker: Arc<Box<dyn Invoker>>) -> Result<()>;
    async fn refer(&self, url: Url) -> Result<Arc<Self::Invoker>>;
}