Unverified 提交 38ff617f authored 作者: satoren's avatar satoren

feat: Add Send trait to future for transport trait

上级 6acce099
......@@ -228,7 +228,7 @@ impl fmt::Debug for DirectTransport {
}
}
#[async_trait(?Send)]
#[async_trait]
impl Transport for DirectTransport {
/// Transport id.
fn id(&self) -> TransportId {
......@@ -385,7 +385,7 @@ impl Transport for DirectTransport {
}
}
#[async_trait(?Send)]
#[async_trait]
impl TransportGeneric for DirectTransport {
type Dump = DirectTransportDump;
type Stat = DirectTransportStat;
......
......@@ -271,7 +271,7 @@ impl fmt::Debug for PipeTransport {
}
}
#[async_trait(?Send)]
#[async_trait]
impl Transport for PipeTransport {
fn id(&self) -> TransportId {
self.inner.id
......@@ -414,7 +414,7 @@ impl Transport for PipeTransport {
}
}
#[async_trait(?Send)]
#[async_trait]
impl TransportGeneric for PipeTransport {
type Dump = PipeTransportDump;
type Stat = PipeTransportStat;
......
......@@ -301,7 +301,7 @@ impl fmt::Debug for PlainTransport {
}
}
#[async_trait(?Send)]
#[async_trait]
impl Transport for PlainTransport {
fn id(&self) -> TransportId {
self.inner.id
......@@ -444,7 +444,7 @@ impl Transport for PlainTransport {
}
}
#[async_trait(?Send)]
#[async_trait]
impl TransportGeneric for PlainTransport {
type Dump = PlainTransportDump;
type Stat = PlainTransportStat;
......
......@@ -149,7 +149,7 @@ pub(super) enum TransportType {
/// * [`DirectTransport`](crate::direct_transport::DirectTransport)
///
/// For additional methods see [`TransportGeneric`].
#[async_trait(?Send)]
#[async_trait]
pub trait Transport: Debug + Send + Sync + private::CloneTransport {
/// Transport id.
#[must_use]
......@@ -282,7 +282,7 @@ impl Clone for Box<dyn Transport> {
}
/// Generic transport trait with methods available on all transports in addition to [`Transport`].
#[async_trait(?Send)]
#[async_trait]
pub trait TransportGeneric: Transport + Clone + 'static {
/// Dump data structure specific to each transport.
#[doc(hidden)]
......@@ -360,7 +360,7 @@ pub enum ConsumeDataError {
Request(RequestError),
}
#[async_trait(?Send)]
#[async_trait]
pub(super) trait TransportImpl: TransportGeneric {
fn router(&self) -> &Router;
......
......@@ -356,7 +356,7 @@ impl fmt::Debug for WebRtcTransport {
}
}
#[async_trait(?Send)]
#[async_trait]
impl Transport for WebRtcTransport {
fn id(&self) -> TransportId {
self.inner.id
......@@ -499,7 +499,7 @@ impl Transport for WebRtcTransport {
}
}
#[async_trait(?Send)]
#[async_trait]
impl TransportGeneric for WebRtcTransport {
type Dump = WebRtcTransportDump;
type Stat = WebRtcTransportStat;
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论