Struct interceptor::mock::mock_interceptor::MockInterceptor
source · pub struct MockInterceptor {
pub bind_rtcp_reader_fn: Option<BindRtcpReaderFn>,
pub bind_rtcp_writer_fn: Option<BindRtcpWriterFn>,
pub bind_local_stream_fn: Option<BindLocalStreamFn>,
pub unbind_local_stream_fn: Option<UnbindLocalStreamFn>,
pub bind_remote_stream_fn: Option<BindRemoteStreamFn>,
pub unbind_remote_stream_fn: Option<UnbindRemoteStreamFn>,
pub close_fn: Option<CloseFn>,
}
Expand description
MockInterceptor is an mock Interceptor for testing.
Fields§
§bind_rtcp_reader_fn: Option<BindRtcpReaderFn>
§bind_rtcp_writer_fn: Option<BindRtcpWriterFn>
§bind_local_stream_fn: Option<BindLocalStreamFn>
§unbind_local_stream_fn: Option<UnbindLocalStreamFn>
§bind_remote_stream_fn: Option<BindRemoteStreamFn>
§unbind_remote_stream_fn: Option<UnbindRemoteStreamFn>
§close_fn: Option<CloseFn>
Trait Implementations§
source§impl Default for MockInterceptor
impl Default for MockInterceptor
source§fn default() -> MockInterceptor
fn default() -> MockInterceptor
source§impl Interceptor for MockInterceptor
impl Interceptor for MockInterceptor
source§fn bind_rtcp_reader<'life0, 'async_trait>(
&'life0 self,
reader: Arc<dyn RTCPReader + Send + Sync>
) -> Pin<Box<dyn Future<Output = Arc<dyn RTCPReader + Send + Sync>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn bind_rtcp_reader<'life0, 'async_trait>(
&'life0 self,
reader: Arc<dyn RTCPReader + Send + Sync>
) -> Pin<Box<dyn Future<Output = Arc<dyn RTCPReader + Send + Sync>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
bind_rtcp_reader lets you modify any incoming RTCP packets. It is called once per sender/receiver, however this might change in the future. The returned method will be called once per packet batch.
source§fn bind_rtcp_writer<'life0, 'async_trait>(
&'life0 self,
writer: Arc<dyn RTCPWriter + Send + Sync>
) -> Pin<Box<dyn Future<Output = Arc<dyn RTCPWriter + Send + Sync>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn bind_rtcp_writer<'life0, 'async_trait>(
&'life0 self,
writer: Arc<dyn RTCPWriter + Send + Sync>
) -> Pin<Box<dyn Future<Output = Arc<dyn RTCPWriter + Send + Sync>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
bind_rtcp_writer lets you modify any outgoing RTCP packets. It is called once per PeerConnection. The returned method will be called once per packet batch.
source§fn bind_local_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
info: &'life1 StreamInfo,
writer: Arc<dyn RTPWriter + Send + Sync>
) -> Pin<Box<dyn Future<Output = Arc<dyn RTPWriter + Send + Sync>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn bind_local_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
info: &'life1 StreamInfo,
writer: Arc<dyn RTPWriter + Send + Sync>
) -> Pin<Box<dyn Future<Output = Arc<dyn RTPWriter + Send + Sync>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
bind_local_stream lets you modify any outgoing RTP packets. It is called once for per LocalStream. The returned method will be called once per rtp packet.
source§fn unbind_local_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
info: &'life1 StreamInfo
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn unbind_local_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
info: &'life1 StreamInfo
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
unbind_local_stream is called when the Stream is removed. It can be used to clean up any data related to that track.
source§fn bind_remote_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
info: &'life1 StreamInfo,
reader: Arc<dyn RTPReader + Send + Sync>
) -> Pin<Box<dyn Future<Output = Arc<dyn RTPReader + Send + Sync>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn bind_remote_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
info: &'life1 StreamInfo,
reader: Arc<dyn RTPReader + Send + Sync>
) -> Pin<Box<dyn Future<Output = Arc<dyn RTPReader + Send + Sync>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
bind_remote_stream lets you modify any incoming RTP packets. It is called once for per RemoteStream. The returned method will be called once per rtp packet.
source§fn unbind_remote_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
info: &'life1 StreamInfo
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn unbind_remote_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
info: &'life1 StreamInfo
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
unbind_remote_stream is called when the Stream is removed. It can be used to clean up any data related to that track.