[][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> !Send for LoadExtensionGuard<'conn>

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

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

impl<T, U> TryInto 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> Any for T where
    T: 'static + ?Sized
[src]