Trait sozu_lib::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; }
Expand description

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

Implementors