Struct MockConnectInfo
struct MockConnectInfo<T>(661)
Middleware used to mock ConnectInfo during tests.
If you're accidentally using MockConnectInfo and
Router::into_make_service_with_connect_info at the same time then
Router::into_make_service_with_connect_info takes precedence.
Example
use ;
use SocketAddr;
use ServiceExt;
async
// this router you can run with `app.into_make_service_with_connect_info::<SocketAddr>()`
// use this router for tests
// #[tokio::test]
async
#
#
# async
Implementations
impl<S, T> Layer for MockConnectInfo<T>
fn layer(self: &Self, inner: S) -> <Self as >::Service
impl<T> Any for MockConnectInfo<T>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for MockConnectInfo<T>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for MockConnectInfo<T>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for MockConnectInfo<T>
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> Freeze for MockConnectInfo<T>
impl<T> From for MockConnectInfo<T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> FromRef for MockConnectInfo<T>
fn from_ref(input: &T) -> T
impl<T> Instrument for MockConnectInfo<T>
impl<T> RefUnwindSafe for MockConnectInfo<T>
impl<T> Same for MockConnectInfo<T>
impl<T> Send for MockConnectInfo<T>
impl<T> Sync for MockConnectInfo<T>
impl<T> ToOwned for MockConnectInfo<T>
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T> Unpin for MockConnectInfo<T>
impl<T> UnwindSafe for MockConnectInfo<T>
impl<T> WithSubscriber for MockConnectInfo<T>
impl<T, U> Into for MockConnectInfo<T>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for MockConnectInfo<T>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for MockConnectInfo<T>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T: $crate::clone::Clone> Clone for MockConnectInfo<T>
fn clone(self: &Self) -> MockConnectInfo<T>
impl<T: $crate::fmt::Debug> Debug for MockConnectInfo<T>
fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl<T: $crate::marker::Copy> Copy for MockConnectInfo<T>
impl<V, T> VZip for MockConnectInfo<T>
fn vzip(self: Self) -> V