Backends

  • A namespace to which Backends are added as nested types.

    See more

    Declaration

    Swift

    public enum Backends
  • 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 Backends.

    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 is then the type name minus the Backends. prefix.

    If a custom backend name is specified via the Orion CLI, Orion will automatically attempt to import a module named OrionBackend_<backend name> 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 named OrionBackend_Foo.

    For more information on backends, consult the Orion CLI documentation.

    See more

    Declaration

    Swift

    public protocol Backend
  • A backend which Orion can use as a default.

    See more

    Declaration

    Swift

    public protocol DefaultBackend : Backend
  • A type describing a single hook.

    See more

    Declaration

    Swift

    public enum HookDescriptor