Trait ThreadSafeArgContext
pub trait ThreadSafeArgContext: ThreadSafeSealed {
// Required method
fn guarantee_thread_safe();
}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()
fn guarantee_thread_safe()
Panics if the value is being used in a non thread-safe context.
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.