|
1 | | -//! Async DataChannel implementation |
| 1 | +//! Async DataChannel API |
2 | 2 |
|
3 | 3 | use crate::peer_connection::{MessageInner, PeerConnectionRef}; |
4 | 4 | use crate::runtime::{Mutex, Receiver}; |
5 | | -use crate::{Error, Result}; |
6 | 5 | use bytes::BytesMut; |
7 | | -use rtc::data_channel::{RTCDataChannelId, RTCDataChannelMessage, RTCDataChannelState}; |
8 | 6 | use rtc::interceptor::{Interceptor, NoopInterceptor}; |
| 7 | +use rtc::shared::error::{Error, Result}; |
9 | 8 | use std::sync::Arc; |
10 | 9 |
|
| 10 | +pub use rtc::data_channel::{ |
| 11 | + RTCDataChannelId, RTCDataChannelInit, RTCDataChannelMessage, RTCDataChannelState, |
| 12 | +}; |
| 13 | + |
11 | 14 | /// Object-safe trait exposing all public DataChannel operations. |
12 | 15 | /// |
13 | 16 | /// This allows `on_data_channel` in `PeerConnectionEventHandler` to receive a |
@@ -274,7 +277,7 @@ where |
274 | 277 | /// |
275 | 278 | /// ```no_run |
276 | 279 | /// # use bytes::BytesMut; |
277 | | - /// # use webrtc::Result; |
| 280 | + /// # use webrtc::error::Result; |
278 | 281 | /// # use webrtc::data_channel::DataChannel; |
279 | 282 | /// # use std::sync::Arc; |
280 | 283 | /// # async fn example(dc: Arc<dyn DataChannel>) -> Result<()> { |
@@ -303,7 +306,7 @@ where |
303 | 306 | /// # Example |
304 | 307 | /// |
305 | 308 | /// ```no_run |
306 | | - /// # use webrtc::Result; |
| 309 | + /// # use webrtc::error::Result; |
307 | 310 | /// # use webrtc::data_channel::DataChannel; |
308 | 311 | /// # use std::sync::Arc; |
309 | 312 | /// # async fn example(dc: Arc<dyn DataChannel>) -> Result<()> { |
|
0 commit comments