Skip to main content

MakeMockServer

Trait MakeMockServer 

pub trait MakeMockServer<Io, Marker> {
    type Server;

    // Required method
    fn make_server(&self, input: &ConnectRequest) -> Self::Server;
}
Available on crate feature net only.
Expand description

What a mock connector makes the server of each connection with: a closure without arguments, a closure over the ConnectRequest, or a Clone server of Io.

Required Associated Types§

type Server

Required Methods§

fn make_server(&self, input: &ConnectRequest) -> Self::Server

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

§

impl<Io, F, Server> MakeMockServer<Io, fn(&ConnectRequest) -> Server> for F
where F: Fn(&ConnectRequest) -> Server,

§

type Server = Server

§

impl<Io, F, Server> MakeMockServer<Io, fn() -> Server> for F
where F: Fn() -> Server,

§

type Server = Server

§

impl<Io, S> MakeMockServer<Io, ServerClone> for S
where S: Service<Io> + Clone,

§

type Server = S