Loading crates/tor-chanmgr/src/builder.rs +5 −5 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ use std::io; use std::sync::{Arc, Mutex}; use crate::factory::{BootstrapReporter, ChannelFactory}; use crate::transport::TransportHelper; use crate::transport::TransportImplHelper; use crate::{event::ChanMgrEventSender, Error}; use std::time::Duration; Loading @@ -28,7 +28,7 @@ use futures::task::SpawnExt; /// /// This channel builder does not retry on failure, but it _does_ implement a /// time-out. pub struct ChanBuilder<R: Runtime, H: TransportHelper> pub struct ChanBuilder<R: Runtime, H: TransportImplHelper> where R: tor_rtcompat::TlsProvider<H::Stream>, { Loading @@ -40,7 +40,7 @@ where tls_connector: <R as TlsProvider<H::Stream>>::Connector, } impl<R: Runtime, H: TransportHelper> ChanBuilder<R, H> impl<R: Runtime, H: TransportImplHelper> ChanBuilder<R, H> where R: TlsProvider<H::Stream>, { Loading @@ -55,7 +55,7 @@ where } } #[async_trait] impl<R: Runtime, H: TransportHelper> ChannelFactory for ChanBuilder<R, H> impl<R: Runtime, H: TransportImplHelper> ChannelFactory for ChanBuilder<R, H> where R: tor_rtcompat::TlsProvider<H::Stream> + Send + Sync, H: Send + Sync, Loading Loading @@ -84,7 +84,7 @@ where } } impl<R: Runtime, H: TransportHelper> ChanBuilder<R, H> impl<R: Runtime, H: TransportImplHelper> ChanBuilder<R, H> where R: tor_rtcompat::TlsProvider<H::Stream> + Send + Sync, H: Send + Sync, Loading crates/tor-chanmgr/src/factory.rs +1 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ impl BootstrapReporter { /// construct all of its channels. /// /// A `ChannelFactory` can be implemented in terms of a /// [`TransportHelper`](crate::transport::TransportHelper), by wrapping it in a /// [`TransportImplHelper`](crate::transport::TransportImplHelper), by wrapping it in a /// `ChanBuilder`. /// // FIXME(eta): Rectify the below situation. Loading crates/tor-chanmgr/src/transport.rs +2 −2 Original line number Diff line number Diff line Loading @@ -25,14 +25,14 @@ pub use proxied::ProxyError; /// TLS over some stream-like type, and you only want to define the stream-like /// type. /// /// To convert a [`TransportHelper`] into a /// To convert a [`TransportImplHelper`] into a /// [`ChannelFactory`](crate::factory::ChannelFactory), wrap it in a /// `ChanBuilder`. // // TODO: Maybe move this to a separate crate so that tor-ptmgr can be // used without having to depend on chanmgr. #[async_trait] pub trait TransportHelper { pub trait TransportImplHelper { /// The type of the resulting stream. type Stream: AsyncRead + AsyncWrite + Send + Sync + 'static; Loading crates/tor-chanmgr/src/transport/default.rs +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ impl<R: Runtime> DefaultTransport<R> { } #[async_trait] impl<R: Runtime> crate::transport::TransportHelper for DefaultTransport<R> { impl<R: Runtime> crate::transport::TransportImplHelper for DefaultTransport<R> { type Stream = <R as TcpProvider>::TcpStream; /// Implements the transport: makes a TCP connection (possibly Loading crates/tor-chanmgr/src/transport/proxied.rs +2 −2 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ use tor_socksproto::{ }; #[cfg(feature = "pt-client")] use super::TransportHelper; use super::TransportImplHelper; #[cfg(feature = "pt-client")] use async_trait::async_trait; #[cfg(feature = "pt-client")] Loading Loading @@ -285,7 +285,7 @@ impl<R: TcpProvider + Send + Sync> ExternalProxyPlugin<R> { #[cfg(feature = "pt-client")] #[async_trait] impl<R: TcpProvider + Send + Sync> TransportHelper for ExternalProxyPlugin<R> { impl<R: TcpProvider + Send + Sync> TransportImplHelper for ExternalProxyPlugin<R> { type Stream = R::TcpStream; async fn connect( Loading Loading
crates/tor-chanmgr/src/builder.rs +5 −5 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ use std::io; use std::sync::{Arc, Mutex}; use crate::factory::{BootstrapReporter, ChannelFactory}; use crate::transport::TransportHelper; use crate::transport::TransportImplHelper; use crate::{event::ChanMgrEventSender, Error}; use std::time::Duration; Loading @@ -28,7 +28,7 @@ use futures::task::SpawnExt; /// /// This channel builder does not retry on failure, but it _does_ implement a /// time-out. pub struct ChanBuilder<R: Runtime, H: TransportHelper> pub struct ChanBuilder<R: Runtime, H: TransportImplHelper> where R: tor_rtcompat::TlsProvider<H::Stream>, { Loading @@ -40,7 +40,7 @@ where tls_connector: <R as TlsProvider<H::Stream>>::Connector, } impl<R: Runtime, H: TransportHelper> ChanBuilder<R, H> impl<R: Runtime, H: TransportImplHelper> ChanBuilder<R, H> where R: TlsProvider<H::Stream>, { Loading @@ -55,7 +55,7 @@ where } } #[async_trait] impl<R: Runtime, H: TransportHelper> ChannelFactory for ChanBuilder<R, H> impl<R: Runtime, H: TransportImplHelper> ChannelFactory for ChanBuilder<R, H> where R: tor_rtcompat::TlsProvider<H::Stream> + Send + Sync, H: Send + Sync, Loading Loading @@ -84,7 +84,7 @@ where } } impl<R: Runtime, H: TransportHelper> ChanBuilder<R, H> impl<R: Runtime, H: TransportImplHelper> ChanBuilder<R, H> where R: tor_rtcompat::TlsProvider<H::Stream> + Send + Sync, H: Send + Sync, Loading
crates/tor-chanmgr/src/factory.rs +1 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ impl BootstrapReporter { /// construct all of its channels. /// /// A `ChannelFactory` can be implemented in terms of a /// [`TransportHelper`](crate::transport::TransportHelper), by wrapping it in a /// [`TransportImplHelper`](crate::transport::TransportImplHelper), by wrapping it in a /// `ChanBuilder`. /// // FIXME(eta): Rectify the below situation. Loading
crates/tor-chanmgr/src/transport.rs +2 −2 Original line number Diff line number Diff line Loading @@ -25,14 +25,14 @@ pub use proxied::ProxyError; /// TLS over some stream-like type, and you only want to define the stream-like /// type. /// /// To convert a [`TransportHelper`] into a /// To convert a [`TransportImplHelper`] into a /// [`ChannelFactory`](crate::factory::ChannelFactory), wrap it in a /// `ChanBuilder`. // // TODO: Maybe move this to a separate crate so that tor-ptmgr can be // used without having to depend on chanmgr. #[async_trait] pub trait TransportHelper { pub trait TransportImplHelper { /// The type of the resulting stream. type Stream: AsyncRead + AsyncWrite + Send + Sync + 'static; Loading
crates/tor-chanmgr/src/transport/default.rs +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ impl<R: Runtime> DefaultTransport<R> { } #[async_trait] impl<R: Runtime> crate::transport::TransportHelper for DefaultTransport<R> { impl<R: Runtime> crate::transport::TransportImplHelper for DefaultTransport<R> { type Stream = <R as TcpProvider>::TcpStream; /// Implements the transport: makes a TCP connection (possibly Loading
crates/tor-chanmgr/src/transport/proxied.rs +2 −2 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ use tor_socksproto::{ }; #[cfg(feature = "pt-client")] use super::TransportHelper; use super::TransportImplHelper; #[cfg(feature = "pt-client")] use async_trait::async_trait; #[cfg(feature = "pt-client")] Loading Loading @@ -285,7 +285,7 @@ impl<R: TcpProvider + Send + Sync> ExternalProxyPlugin<R> { #[cfg(feature = "pt-client")] #[async_trait] impl<R: TcpProvider + Send + Sync> TransportHelper for ExternalProxyPlugin<R> { impl<R: TcpProvider + Send + Sync> TransportImplHelper for ExternalProxyPlugin<R> { type Stream = R::TcpStream; async fn connect( Loading