pub struct MockConnectionPool { /* private fields */ }Expand description
Mock connection pool for testing
This implementation allows tests to inject pre-configured responses without requiring actual network connections.
§Examples
use nntp_proxy::pool::{ConnectionPool, MockConnectionPool};
#[tokio::test]
async fn test_with_mock_pool() {
let pool = MockConnectionPool::new("test-server");
// Use pool in tests...
}Implementations§
Trait Implementations§
Source§impl Clone for MockConnectionPool
impl Clone for MockConnectionPool
Source§fn clone(&self) -> MockConnectionPool
fn clone(&self) -> MockConnectionPool
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ConnectionPool for MockConnectionPool
impl ConnectionPool for MockConnectionPool
Auto Trait Implementations§
impl Freeze for MockConnectionPool
impl RefUnwindSafe for MockConnectionPool
impl Send for MockConnectionPool
impl Sync for MockConnectionPool
impl Unpin for MockConnectionPool
impl UnwindSafe for MockConnectionPool
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