juno 0.1.2

A helper rust library for the juno microservices framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::{connection::Buffer, utils::Error};
use async_trait::async_trait;
use futures::channel::mpsc::{UnboundedReceiver, UnboundedSender};

#[async_trait]
pub trait BaseConnection {
	async fn setup_connection(&mut self) -> Result<(), Error>;
	async fn close_connection(&mut self);
	async fn send(&mut self, buffer: Buffer);

	fn get_data_receiver(&mut self) -> UnboundedReceiver<Buffer>;
	fn clone_write_sender(&self) -> UnboundedSender<Buffer>;
}