This pull request contains a new opaque struct ThreadContext that contains all thread context handling.
One benefit of this is the Drop implementations for Proj and ProjBuilder no longer need to handle destroying the thread context since that's now handled by the Drop implementation for ThreadContext. Also, ThreadContext now implements Clone, which gets us one step closer to implementing Clone for Proj. I chose the ThreadContext name because it's a little more descriptive than Context and the PROJ docs call this concept a "thread context". I created a separate file for it because I noticed proj.rs is getting on the larger side.
This pull request contains a new opaque struct
ThreadContext
that contains all thread context handling.One benefit of this is the
Drop
implementations forProj
andProjBuilder
no longer need to handle destroying the thread context since that's now handled by theDrop
implementation forThreadContext
. Also,ThreadContext
now implementsClone
, which gets us one step closer to implementingClone
forProj
. I chose theThreadContext
name because it's a little more descriptive thanContext
and the PROJ docs call this concept a "thread context". I created a separate file for it because I noticedproj.rs
is getting on the larger side.