Add rust_provider_backend_api
Summary: Add a trait abstracting over the set of providers necessary to typecheck a file, and make use of it in rust_provider_backend_ffi. When using a backend other than HhServerProviderBackend, raise panics (which are converted to OCaml exceptions by `ocaml_ffi!`) when attempting to invoke one of the rust_provider_backend_ffi functions outside of the minimum set necessary to typecheck a file. This makes it easier to implement the RustProviderBackend trait for use cases which are only interested in typechecking files (e.g., hh_distc workers, potentially hh rearchitecture workers, potentially zoncolan workers).
Reviewed By: edwinsmith
Differential Revision:
D39780735
fbshipit-source-id:
6d0152e831679f9d4fd5c98925cf5f59c44fd812