public protocol Backend
The type that handles hooking of methods and functions.
Unless you have specific requirements, you should be able to use one
of the pre-defined backends declared on
If you are creating a custom
Backend implementation which is intended
for distribution, declare it as a nested type in an extension on the
Backends enumeration. The backend’s name (which is understood by the
Orion CLI) is then the type name minus the
If a custom backend name is specified via the Orion CLI, Orion will
automatically attempt to import a module named
if it exists, so it is recommended that you follow this nomenclature while
naming your framework. Note that when determining the framework name, any
generic arguments are stripped from the type name, and only the first
component of the name is used.
For example, a backend with the type
Backends.Foo.Bar<Int> will be referred
to by the name
Foo.Bar<Int>, and Orion will attempt to auto-import a module
Hooks the provided functions and methods.
func apply(descriptors: [HookDescriptor])
The descriptors for the hooks to be applied.