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
sourceimpl<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> RefUnwindSafe for Connection<E>where
E: RefUnwindSafe,
<E as Engine>::PortalType: RefUnwindSafe,
impl<E> Send for Connection<E>
impl<E> Sync for Connection<E>
impl<E> Unpin for Connection<E>where
E: Unpin,
<E as Engine>::PortalType: Unpin,
impl<E> UnwindSafe for Connection<E>where
E: UnwindSafe,
<E as Engine>::PortalType: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more