bifrostlink 0.2.0

Topology-aware RPC library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use async_trait::async_trait;

use crate::packet::{OutgoingMessage, RequestId};
use crate::Config;

#[async_trait]
pub(crate) trait RequestHandler<C: Config>: Sync + 'static + Send {
	async fn handle(
		&self,
		packet_source: C::Address,
		request: C::EncodedData,
		rid: &RequestId,
		respond_to: C::Address,
	) -> OutgoingMessage<C::Address>;
	fn cancel_safe(&self) -> bool;
}