Trait sozu_lib::network::server::ProxySessionCast [−][src]
pub trait ProxySessionCast: ProxySession { fn as_tcp(&mut self) -> &mut Session; fn as_http(&mut self) -> &mut Session; fn as_https_rustls(&mut self) -> &mut Session; }
this trait is used to work around the fact that we need to transform
the sessions (that are all stored as a ProxySession in the slab) back
to their original type to call the connect_to_backend method of
their corresponding Proxy.
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 session and making connect_to_backend a method of ProxySession?),
we'll be able to remove all those ugly casts and panics
Required Methods
fn as_tcp(&mut self) -> &mut Session
fn as_http(&mut self) -> &mut Session
fn as_https_rustls(&mut self) -> &mut Session
Implementors
impl ProxySessionCast for ListenSessionimpl ProxySessionCast for sozu_lib::network::http::Sessionimpl ProxySessionCast for sozu_lib::network::tcp::Sessionimpl ProxySessionCast for sozu_lib::network::https_rustls::session::Session