pub fn custom_tower_make_service_factory<M, T>(
make_service: M,
target: T,
) -> TowerMakeServiceFactory<M, T>
Available on crate feature
tower
only.Expand description
Create a TowerMakeServiceFactory
from a given tower::MakeService
and target
value.
target
is the value that will be passed to the [tower::MakeService::make_service
] method.
target
will be cloned for each new connection.
If the target
should be the remote address of the incoming connection, use tower_make_service_with_addr_factory
instead.
If target
is not needed, use tower_make_service_factory
instead.