[][src]Struct postgres_query::Caching

pub struct Caching<C> where
    C: GenericClient
{ /* fields omitted */ }

A client wrapper which caches prepared queries.

Only queries prepared through the GenericClient::prepare_static trait method are actually cached.

Methods

impl<C> Caching<C> where
    C: GenericClient
[src]

pub fn new(client: C) -> Caching<C>[src]

Wrap a client in a new cache.

pub fn into_inner(self) -> C[src]

Return the inner client.

impl Caching<Client>[src]

pub async fn transaction<'_, '_>(
    &'_ mut self
) -> Result<Caching<Transaction<'_>>, Error>
[src]

Start a new transaction that shares the same cache as the current client.

impl<'_> Caching<Transaction<'_>>[src]

pub async fn transaction<'_, '_>(
    &'_ mut self
) -> Result<Caching<Transaction<'_>>, Error>
[src]

Start a new transaction that shares the same cache as the current client.

Trait Implementations

impl<C: Clone> Clone for Caching<C> where
    C: GenericClient
[src]

impl<C> Deref for Caching<C> where
    C: GenericClient
[src]

type Target = C

The resulting type after dereferencing.

impl<C> DerefMut for Caching<C> where
    C: GenericClient
[src]

impl<C> From<C> for Caching<C> where
    C: GenericClient
[src]

impl<C> GenericClient for Caching<C> where
    C: GenericClient + Sync + Send
[src]

Auto Trait Implementations

impl<C> !RefUnwindSafe for Caching<C>

impl<C> Send for Caching<C> where
    C: Send

impl<C> Sync for Caching<C> where
    C: Sync

impl<C> Unpin for Caching<C> where
    C: Unpin

impl<C> !UnwindSafe for Caching<C>

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<!> for T[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,