Trait sozu_lib::network::proxy::ProxyClientCast [−][src]
pub trait ProxyClientCast: ProxyClient { fn as_tcp(&mut self) -> &mut Client; fn as_http(&mut self) -> &mut Client; fn as_https_rustls(&mut self) -> &mut TlsClient; }
this trait is used to work around the fact that we need to transform
the clients (that are all stored as a ProxyClient in the slab) back
to their original type to call the connect_to_backend method of
their corresponding ServerConfiguration.
If we find a way to make connect_to_backend work wothout transforming
back to the type (example: storing a reference to the configuration
in the client and making connect_to_backend a method of ProxyClient?),
we'll be able to remove all those ugly casts and panics
Required Methods
fn as_tcp(&mut self) -> &mut Client
fn as_http(&mut self) -> &mut Client
fn as_https_rustls(&mut self) -> &mut TlsClient
Implementors
impl ProxyClientCast for ListenClientimpl ProxyClientCast for sozu_lib::network::http::Clientimpl ProxyClientCast for sozu_lib::network::tcp::Clientimpl ProxyClientCast for TlsClient