Struct convergence::connection::Connection
source · pub struct Connection<E: Engine> { /* private fields */ }
Expand description
Describes a connection using a specific engine. Contains connection state including prepared statements and portals.
Implementations§
source§impl<E: Engine> Connection<E>
impl<E: Engine> Connection<E>
sourcepub 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).
Auto Trait Implementations§
impl<E> Freeze for Connection<E>where
E: Freeze,
impl<E> RefUnwindSafe for Connection<E>
impl<E> Send for Connection<E>
impl<E> Sync for Connection<E>
impl<E> Unpin for Connection<E>
impl<E> UnwindSafe for Connection<E>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more