2023-02-16
1492
#rust
Damilare Jolayemi
159488
107
Feb 16, 2023 â‹… 5 min read

How to build polymorphic components in Rust

Damilare Jolayemi Damilare is an enthusiastic problem-solver who enjoys building whatever works on the computer. He has a knack for slapping his keyboards till something works. When he's not talking to his laptop, you'll find him hopping on road trips and sharing moments with his friends, or watching shows on Netflix.

Recent posts:

A Comprehensive Guide To JavaScript Generators

A comprehensive guide to JavaScript generators

JavaScript generators offer a powerful and often overlooked way to handle asynchronous operations, manage state, and process data streams.

Fimber Elemuwa
Jan 24, 2025 â‹… 8 min read
​​Solving Micro-Frontend Challenges With Module Federation

​​Solving micro-frontend challenges with Module Federation

webpack’s Module Federation allows you to easily share code and dependencies between applications, helpful in micro-frontend architecture.

Peter Aideloje
Jan 23, 2025 â‹… 7 min read
typescript object destructuring

TypeScript object destructuring and you

Whether you’re part of the typed club or not, one function within TypeScript that can make life a lot easier is object destructuring.

Lewis Cianci
Jan 22, 2025 â‹… 5 min read
Using Firebase For ASP.NET Authentication

Using Firebase for ASP.NET authentication

Firebase is one of the most popular authentication providers available today. Meanwhile, .NET stands out as a good choice for […]

Lewis Cianci
Jan 21, 2025 â‹… 9 min read
View all posts

2 Replies to "How to build polymorphic components in Rust"

  1. It looks like the code example in the Enum section omits the definition of the enum Creature. Could that be fixed or could you send me the complete example.

  2. The dynamic dispatch section has the two lines

    dynamic_dispatch(cat); // Cat is walking
    dynamic_dispatch(dog); // Dog is walking

    I think they should be

    dynamic_dispatch(&cat); // Cat is walking
    dynamic_dispatch(&dog); // Dog is walking

    instead.

Leave a Reply