# Specify interface methods to implement

**URL:** <https://discourse.julialang.org/t/specify-interface-methods-to-implement/73072>\
**Category:** General Usage\
**Created:** [December 14, 2021, 11:42am UTC](https://discourse.julialang.org/t/specify-interface-methods-to-implement/73072 "2021-12-14T11:42:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HugoTrentesaux](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hugotrentesaux/32/12583_2.png) [@HugoTrentesaux](https://discourse.julialang.org/u/HugoTrentesaux)\
**Post date:** [December 14, 2021, 11:42am UTC](https://discourse.julialang.org/t/specify-interface-methods-to-implement/73072/1 "2021-12-14T11:42:11Z")

</div>

Is there a way (other than documentation) to define an interface in a way allowing to automatically check that a struct implements all required methods at compile time?

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [December 14, 2021, 12:54pm UTC](https://discourse.julialang.org/t/specify-interface-methods-to-implement/73072/2 "2021-12-14T12:54:59Z")

</div>

No, not that I’m aware of.

---

<div class="post-metadata">

**Author:** ![josuagrw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/josuagrw/32/1015_2.png) [@josuagrw](https://discourse.julialang.org/u/josuagrw)\
**Post date:** [December 14, 2021, 3:51pm UTC](https://discourse.julialang.org/t/specify-interface-methods-to-implement/73072/3 "2021-12-14T15:51:15Z")

</div>

It is probably possible using introspection and reflection techniques, described here [Dispatch, Traits and Metaprogramming Over Reflection](https://www.oxinabox.net/2018/10/03/Dispatch,-Traits-and-Metaprogramming-Over-Reflection.html#part-4-hard-core-reflecting-upon-methods)
