Struct convergence::connection::Connection[][src]

pub struct Connection<E: Engine, S> { /* fields omitted */ }

Describes a connection using a specific engine and stream type. Contains connection state including prepared statements and portals.

Implementations

impl<E: Engine, S: AsyncRead + AsyncWrite + Unpin> Connection<E, S>[src]

pub fn new(engine: E) -> Self[src]

Create a new connection from an engine instance.

pub async fn run(&mut self, stream: S) -> Result<(), ConnectionError>[src]

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, S> RefUnwindSafe for Connection<E, S> where
    E: RefUnwindSafe,
    S: RefUnwindSafe,
    <E as Engine>::PortalType: RefUnwindSafe

impl<E, S> Send for Connection<E, S> where
    S: Send

impl<E, S> Sync for Connection<E, S> where
    S: Sync

impl<E, S> Unpin for Connection<E, S> where
    E: Unpin,
    S: Unpin,
    <E as Engine>::PortalType: Unpin

impl<E, S> UnwindSafe for Connection<E, S> where
    E: UnwindSafe,
    S: UnwindSafe,
    <E as Engine>::PortalType: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.