When building async futures, it's common to implement the ArcWake trait in wakers. I understand this is done to avoid writing boilerplate, creating vtables and writing unsafe code (according to the tokio tutorial).
Now, (and this feels like a silly question) what I don't understand is how does implementing a trait avoid writing that other code? When I check the source of the trait, it contains practically nothing: only the declaration of one small function that needs to be implemented to fulfil the trait and the instantiation of another function that calls that one. So, where are all those things we're avoiding writing coming from? Where's the boilerplate, vtables, unsafe code and all that and how does it get executed just because we implemented a trait on a waker?