pub struct TestingConnector<C, S> { /* private fields */ }Expand description
A testing connector wrapper that tracks connection statistics
Implementations§
Source§impl<C, S> TestingConnector<C, S>
impl<C, S> TestingConnector<C, S>
pub fn new( inner: C, stats: Arc<StatisticsTracker>, config: TestingConfig, ) -> Self
Trait Implementations§
Source§impl<C, S> Connector<S> for TestingConnector<C, S>
impl<C, S> Connector<S> for TestingConnector<C, S>
Source§fn connect<'life0, 'async_trait>(
&'life0 self,
state: Arc<S>,
) -> Pin<Box<dyn Future<Output = ConnectorResult<WsStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 self,
state: Arc<S>,
) -> Pin<Box<dyn Future<Output = ConnectorResult<WsStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Connect to the WebSocket server and return the stream
Source§fn disconnect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ConnectorResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn disconnect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ConnectorResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Disconnect from the WebSocket server
Auto Trait Implementations§
impl<C, S> Freeze for TestingConnector<C, S>where
C: Freeze,
impl<C, S> !RefUnwindSafe for TestingConnector<C, S>
impl<C, S> Send for TestingConnector<C, S>
impl<C, S> Sync for TestingConnector<C, S>
impl<C, S> Unpin for TestingConnector<C, S>
impl<C, S> UnsafeUnpin for TestingConnector<C, S>where
C: UnsafeUnpin,
impl<C, S> !UnwindSafe for TestingConnector<C, S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more