@davy thank you for nice post about HRTB. I didn't know about it before. To be honest, I'm also having trouble to understand `Fn`, `FnOnce`, and `FnMut`, so I prefer to use custom traits like `MyFn` to understand what's going on: https://github.com/sergey-shandar/public/blob/main/hrtb/src/main.rs#L32
Conversation
Notices
-
Embed this notice
Sergey on FunctionalScript (functionalscript@techhub.social)'s status on Monday, 01-Jan-2024 14:42:37 JST Sergey on FunctionalScript -
Embed this notice
Davy :ferris: (davy@hachyderm.io)'s status on Monday, 01-Jan-2024 14:42:38 JST Davy :ferris: While playing with Serde's deserializer lifetimes in some project, this is the very first time I'm using a Higher-Rank Trait Bound (HRTB). Somehow it makes sense but at first glance the syntax is utterly confusing 🙈 .
In conversation permalink
-
Embed this notice