Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
38ff617f
Unverified
提交
38ff617f
authored
12月 07, 2021
作者:
satoren
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: Add Send trait to future for transport trait
上级
6acce099
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
11 行增加
和
11 行删除
+11
-11
direct_transport.rs
rust/src/router/direct_transport.rs
+2
-2
pipe_transport.rs
rust/src/router/pipe_transport.rs
+2
-2
plain_transport.rs
rust/src/router/plain_transport.rs
+2
-2
transport.rs
rust/src/router/transport.rs
+3
-3
webrtc_transport.rs
rust/src/router/webrtc_transport.rs
+2
-2
没有找到文件。
rust/src/router/direct_transport.rs
浏览文件 @
38ff617f
...
@@ -228,7 +228,7 @@ impl fmt::Debug for DirectTransport {
...
@@ -228,7 +228,7 @@ impl fmt::Debug for DirectTransport {
}
}
}
}
#[async_trait
(
?
Send)
]
#[async_trait]
impl
Transport
for
DirectTransport
{
impl
Transport
for
DirectTransport
{
/// Transport id.
/// Transport id.
fn
id
(
&
self
)
->
TransportId
{
fn
id
(
&
self
)
->
TransportId
{
...
@@ -385,7 +385,7 @@ impl Transport for DirectTransport {
...
@@ -385,7 +385,7 @@ impl Transport for DirectTransport {
}
}
}
}
#[async_trait
(
?
Send)
]
#[async_trait]
impl
TransportGeneric
for
DirectTransport
{
impl
TransportGeneric
for
DirectTransport
{
type
Dump
=
DirectTransportDump
;
type
Dump
=
DirectTransportDump
;
type
Stat
=
DirectTransportStat
;
type
Stat
=
DirectTransportStat
;
...
...
rust/src/router/pipe_transport.rs
浏览文件 @
38ff617f
...
@@ -271,7 +271,7 @@ impl fmt::Debug for PipeTransport {
...
@@ -271,7 +271,7 @@ impl fmt::Debug for PipeTransport {
}
}
}
}
#[async_trait
(
?
Send)
]
#[async_trait]
impl
Transport
for
PipeTransport
{
impl
Transport
for
PipeTransport
{
fn
id
(
&
self
)
->
TransportId
{
fn
id
(
&
self
)
->
TransportId
{
self
.inner.id
self
.inner.id
...
@@ -414,7 +414,7 @@ impl Transport for PipeTransport {
...
@@ -414,7 +414,7 @@ impl Transport for PipeTransport {
}
}
}
}
#[async_trait
(
?
Send)
]
#[async_trait]
impl
TransportGeneric
for
PipeTransport
{
impl
TransportGeneric
for
PipeTransport
{
type
Dump
=
PipeTransportDump
;
type
Dump
=
PipeTransportDump
;
type
Stat
=
PipeTransportStat
;
type
Stat
=
PipeTransportStat
;
...
...
rust/src/router/plain_transport.rs
浏览文件 @
38ff617f
...
@@ -301,7 +301,7 @@ impl fmt::Debug for PlainTransport {
...
@@ -301,7 +301,7 @@ impl fmt::Debug for PlainTransport {
}
}
}
}
#[async_trait
(
?
Send)
]
#[async_trait]
impl
Transport
for
PlainTransport
{
impl
Transport
for
PlainTransport
{
fn
id
(
&
self
)
->
TransportId
{
fn
id
(
&
self
)
->
TransportId
{
self
.inner.id
self
.inner.id
...
@@ -444,7 +444,7 @@ impl Transport for PlainTransport {
...
@@ -444,7 +444,7 @@ impl Transport for PlainTransport {
}
}
}
}
#[async_trait
(
?
Send)
]
#[async_trait]
impl
TransportGeneric
for
PlainTransport
{
impl
TransportGeneric
for
PlainTransport
{
type
Dump
=
PlainTransportDump
;
type
Dump
=
PlainTransportDump
;
type
Stat
=
PlainTransportStat
;
type
Stat
=
PlainTransportStat
;
...
...
rust/src/router/transport.rs
浏览文件 @
38ff617f
...
@@ -149,7 +149,7 @@ pub(super) enum TransportType {
...
@@ -149,7 +149,7 @@ pub(super) enum TransportType {
/// * [`DirectTransport`](crate::direct_transport::DirectTransport)
/// * [`DirectTransport`](crate::direct_transport::DirectTransport)
///
///
/// For additional methods see [`TransportGeneric`].
/// For additional methods see [`TransportGeneric`].
#[async_trait
(
?
Send)
]
#[async_trait]
pub
trait
Transport
:
Debug
+
Send
+
Sync
+
private
::
CloneTransport
{
pub
trait
Transport
:
Debug
+
Send
+
Sync
+
private
::
CloneTransport
{
/// Transport id.
/// Transport id.
#[must_use]
#[must_use]
...
@@ -282,7 +282,7 @@ impl Clone for Box<dyn Transport> {
...
@@ -282,7 +282,7 @@ impl Clone for Box<dyn Transport> {
}
}
/// Generic transport trait with methods available on all transports in addition to [`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
{
pub
trait
TransportGeneric
:
Transport
+
Clone
+
'static
{
/// Dump data structure specific to each transport.
/// Dump data structure specific to each transport.
#[doc(hidden)]
#[doc(hidden)]
...
@@ -360,7 +360,7 @@ pub enum ConsumeDataError {
...
@@ -360,7 +360,7 @@ pub enum ConsumeDataError {
Request
(
RequestError
),
Request
(
RequestError
),
}
}
#[async_trait
(
?
Send)
]
#[async_trait]
pub
(
super
)
trait
TransportImpl
:
TransportGeneric
{
pub
(
super
)
trait
TransportImpl
:
TransportGeneric
{
fn
router
(
&
self
)
->
&
Router
;
fn
router
(
&
self
)
->
&
Router
;
...
...
rust/src/router/webrtc_transport.rs
浏览文件 @
38ff617f
...
@@ -356,7 +356,7 @@ impl fmt::Debug for WebRtcTransport {
...
@@ -356,7 +356,7 @@ impl fmt::Debug for WebRtcTransport {
}
}
}
}
#[async_trait
(
?
Send)
]
#[async_trait]
impl
Transport
for
WebRtcTransport
{
impl
Transport
for
WebRtcTransport
{
fn
id
(
&
self
)
->
TransportId
{
fn
id
(
&
self
)
->
TransportId
{
self
.inner.id
self
.inner.id
...
@@ -499,7 +499,7 @@ impl Transport for WebRtcTransport {
...
@@ -499,7 +499,7 @@ impl Transport for WebRtcTransport {
}
}
}
}
#[async_trait
(
?
Send)
]
#[async_trait]
impl
TransportGeneric
for
WebRtcTransport
{
impl
TransportGeneric
for
WebRtcTransport
{
type
Dump
=
WebRtcTransportDump
;
type
Dump
=
WebRtcTransportDump
;
type
Stat
=
WebRtcTransportStat
;
type
Stat
=
WebRtcTransportStat
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论