Struct convergence::connection::Connection [−][src]
pub struct Connection<E: Engine> { /* fields omitted */ }
Expand description
Describes a connection using a specific engine. Contains connection state including prepared statements and portals.
Implementations
pub async fn run(
&mut self,
stream: impl AsyncRead + AsyncWrite + Unpin
) -> Result<(), ConnectionError>
pub async fn run(
&mut self,
stream: impl AsyncRead + AsyncWrite + Unpin
) -> Result<(), ConnectionError>
Given a stream (typically TCP), extract Postgres protocol messages and respond accordingly. This function only returns when the connection is closed (either gracefully or due to an error).