[][src]Struct rusqlite::LoadExtensionGuard

pub struct LoadExtensionGuard<'conn> { /* fields omitted */ }

RAII guard temporarily enabling SQLite extensions to be loaded.

Example

fn load_my_extension(conn: &Connection) -> Result<()> {
    let _guard = LoadExtensionGuard::new(conn)?;

    conn.load_extension(Path::new("my_sqlite_extension"), None)
}

Methods

impl<'_> LoadExtensionGuard<'_>[src]

pub fn new(conn: &Connection) -> Result<LoadExtensionGuard>[src]

Attempt to enable loading extensions. Loading extensions will be disabled when this guard goes out of scope. Cannot be meaningfully nested.

Trait Implementations

impl<'_> Drop for LoadExtensionGuard<'_>[src]

Auto Trait Implementations

impl<'conn> !Sync for LoadExtensionGuard<'conn>

impl<'conn> !Send for LoadExtensionGuard<'conn>

impl<'conn> Unpin for LoadExtensionGuard<'conn>

impl<'conn> !RefUnwindSafe for LoadExtensionGuard<'conn>

impl<'conn> !UnwindSafe for LoadExtensionGuard<'conn>

Blanket Implementations

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.

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

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

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