aleym_core 0.1.0-alpha.1

Extensible news aggregation and knowledge-base engine (Core Library Component of Aleym)
Documentation
1
2
3
4
5
6
7
8
9
10
11
use std::pin::Pin;

use super::AsyncStream;
use crate::net::NetworkError;

pub trait Transport {
	async fn connect(&self, host: &str, port: u16) -> Result<Pin<Box<dyn AsyncStream>>, NetworkError>;
}

#[cfg(any(feature = "net_protocol_http1", feature = "net_protocol_http2"))]
impl<T: Transport> crate::net::protocols::http::Http for T {}