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:

react native's new architecture: sync and async rendering

React Native’s New Architecture: Sync and async rendering

React Native’s New Architecture offers significant performance advantages. In this article, you’ll explore synchronous and asynchronous rendering in React Native through practical use cases.

Emmanuel John
Dec 24, 2024 â‹… 8 min read
Building a Full-Featured Laravel Admin Dashboard with Filament

Building a full-featured Laravel admin dashboard with Filament

Build scalable admin dashboards with Filament and Laravel using Form Builder, Notifications, and Actions for clean, interactive panels.

Kayode Adeniyi
Dec 20, 2024 â‹… 5 min read
Working With URLs In JavaScript

Working with URLs in JavaScript

Break down the parts of a URL and explore APIs for working with them in JavaScript, parsing them, building query strings, checking their validity, etc.

Joe Attardi
Dec 19, 2024 â‹… 6 min read
Lazy Loading Vs. Eager Loading

Lazy loading vs. Eager loading

In this guide, explore lazy loading and error loading as two techniques for fetching data in React apps.

Njong Emy
Dec 18, 2024 â‹… 5 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