Macros for defining the required behaviours of Julia interfaces, and stating that an object implements them.
The goal is to get as much as possible out of defining an interface, specifically:
- Traits: All
@implements
declarations produce compile-time traits that can be checked by other packages - for the whole interface and all of it's optional components. - Tests:
@implements
declarations should be tested in package tests. - Docs: interface documentation can be inserted into trait documentation.
See the IterationInterface
in BaseInterfaces.jl (a subpackage of this package) or the documentation
for examples of @interface
and @implements
.
Note: the syntax here is likely to change as we work out the best ways to define interfaces
If you think it should behave differently or there is better syntax, please make an issue.