What is Nostr?
Mo :ferris: :tux: @ FOSDEM /
npub1j7f…mapy
2023-10-22 22:35:36

Mo :ferris: :tux: @ FOSDEM on Nostr: I had so much fun with #Rust traits in the last two days 😍 1. Write working code ...

I had so much fun with #Rust traits in the last two days 😍

1. Write working code with a concrete type.
2. Abstract that code using traits and generics.
3. Implement that traits for new types.
4. Profit and enjoy the "magic" :ferrisdance:

I also worked with the Serialize trait from serde for the first time. Manually implementing it for your custom types can make your code much more efficient!
We talk about more than 2x speedup! I might write about it tomorrow.

#RustLang
Author Public Key
npub1j7fc87rk03whjh72mphc9hrm8zecfsdywdcscsesznwzcrasudvs75mapy