Skip to main content

HDbcWrapper

Trait HDbcWrapper 

Source
pub trait HDbcWrapper<'env>: DerefMut<Target = HDbc<'env>> {
    type Handle: HDbcWrapper<'env>;

    // Required methods
    fn into_hdbc(self) -> HDbc<'env>;
    fn from_hdbc(handle: HDbc<'env>) -> Self::Handle;
}
Expand description

Implemented by Connected and Unconnected.

There are two implementations of this trait. These two implementations only decide wether or not a disconnect should be executed on drop. This trait allows to handle them both in generic code and makes them syntactically very similar to a direct use of HDbc.

Required Associated Types§

Source

type Handle: HDbcWrapper<'env>

Type to a handle, which also must implement this trait.

Required Methods§

Source

fn into_hdbc(self) -> HDbc<'env>

Release ownership of the internal Connection Handle

Source

fn from_hdbc(handle: HDbc<'env>) -> Self::Handle

Construction from a Connection Handle

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'env> HDbcWrapper<'env> for Unconnected<'env>

Source§

impl<'env, AC: AutocommitMode> HDbcWrapper<'env> for Connected<'env, AC>

Source§

type Handle = Connected<'env, AC>