Function swipl::context::unmanaged_engine_context
source · pub unsafe fn unmanaged_engine_context() -> Context<'static, Unmanaged>
Expand description
Create an unmanaged context for situations where the thread has an engine that rust doesn’t know about.
Example:
let context = unsafe { unmanaged_engine_context() };
Safety
This is unsafe to call if we are not in a swipl environment, or if some other context is active. Furthermore, the lifetime will most definitely be wrong. This should be used by code that doesn’t promiscuously spread this context. all further accesses should be through borrows.