Trait ThreadSafeArgContext
pub trait ThreadSafeArgContext: ThreadSafeSealed {
// Required method
fn guarantee_thread_safe(&self);
}Expand description
Runtime restrictions for AsArg to guarantee thread safe usage of engine types.
For thread safe types that implement Send + Sync this trait is implemented as a no-op. For non thread-safe engine types, a runtime
check is performed that ensures the types can only be passed to the engine on the main thread.
Required Methods§
fn guarantee_thread_safe(&self)
fn guarantee_thread_safe(&self)
Panics if the value is being used in a non thread-safe context.