---
title: "Discussion on \"Structs & Enums: The \"Blueprint\" and \"State Machine\"\" | Hashnode"
description: "Discussion on \"Structs & Enums: The \"Blueprint\" and \"State Machine\"\". In JavaScript, you often use plain objects for everything. In Rust, we use Structs and Enums to model data with absolute precision. Think of it as the difference between a \"Sketch\" and an \"Engineering Blueprint.\"\n\n🏛️ 1. Structs: The \"Blueprint\" Cont..."
url: "https://hashnode.com/posts/structs-enums-the-blueprint-and-state-machine/69d4dff317f859d321cffb70"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Structs & Enums: The "Blueprint" and "State Machine"](https://yafi.hashnode.dev/structs-enums-the-blueprint-and-state-machine?utm_source=hashnode&utm_medium=feed)

In JavaScript, you often use plain objects for everything. In Rust, we use Structs and Enums to model data with absolute precision. Think of it as the difference between a "Sketch" and an "Engineering Blueprint." 🏛️ 1. Structs: The "Blueprint" Cont...

Apr 7 · 2 min read · yafi.hashnode.dev  
Read the article

-   [#rust](https://hashnode.com/tag/rust)
-   [#structs](https://hashnode.com/tag/structs)
-   [#enums](https://hashnode.com/tag/enums)
-   [#interfaces](https://hashnode.com/tag/interfaces)
-   [#union-types](https://hashnode.com/tag/union-types)

## Written by

[Muhammad Yafi Alhakim](https://hashnode.com/@yafialhakim)

@yafialhakim · Jakarta, Indonesia

  
[View profile](https://hashnode.com/@yafialhakim)

Frontend Engineer @MySkill.id

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
