[][src]Struct sql_support::interrupt::SqlInterruptScope

pub struct SqlInterruptScope {
    start_value: usize,
    ptr: Arc<AtomicUsize>,
}

A helper that can be used to determine if an interrupt request has come in while the object lives. This is used to avoid a case where we aren't running any queries when the request to stop comes in, but we're still not done (for example, maybe we've run some of the autocomplete matchers, and are about to start running the others. If we rely solely on sqlite3_interrupt(), we'd miss the message that we should stop).

Fields

start_value: usizeptr: Arc<AtomicUsize>

Implementations

impl SqlInterruptScope[src]

pub fn new(ptr: Arc<AtomicUsize>) -> Self[src]

pub fn err_if_interrupted(&self) -> Result<(), Interrupted>[src]

Add this as an inherent method to reduce the amount of things users have to bring in.

Trait Implementations

impl Debug for SqlInterruptScope[src]

impl Interruptee for SqlInterruptScope[src]

Auto Trait Implementations

impl RefUnwindSafe for SqlInterruptScope

impl Send for SqlInterruptScope

impl Sync for SqlInterruptScope

impl Unpin for SqlInterruptScope

impl UnwindSafe for SqlInterruptScope

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<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.