# knowmefaiz/120-days-rust-journey architecture

> Architecture diagram of the GitHub repository knowmefaiz/120-days-rust-journey, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/knowmefaiz/120-days-rust-journey
- Repository: https://github.com/knowmefaiz/120-days-rust-journey

## Overview

This repository is a small collection of independent Rust learning examples, not a web3 application: it demonstrates traits and dynamic dispatch, enums, basic control flow, and ownership/borrowing. Each executable stands alone; the edges below show only helper calls or trait dispatch visible in the excerpts. There is no README or evidence connecting the examples to one another.

Main entry points: [`src/bin/latihan1.rs`](https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/bin/latihan1.rs) (Greeting Balance Demo), [`src/bin/review_ownership.rs`](https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/bin/review_ownership.rs) (Borrowing Review), [`src/main.rs`](https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/main.rs) (Wallet Trait Demo), [`src/bin/contoh_trait.rs`](https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/bin/contoh_trait.rs) (Wallet NFT Demo)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_traits["Trait Examples"]
  node_main_demo["Wallet Trait Demo<br/>[main.rs]"]
  node_main_describe["Wallet Describe<br/>[main.rs]"]
  node_trait_demo["Wallet NFT Demo<br/>[contoh_trait.rs]"]
  node_trait_impls["Wallet NFT Descriptions<br/>[contoh_trait.rs]"]
end

subgraph group_basics["Basic Examples"]
  node_enum_demo["Wallet Status Demo<br/>[day03_enum.rs]"]
  node_status_format["Status Formatter<br/>[day03_enum.rs]"]
  node_basic_demo["Greeting Balance Demo<br/>[latihan1.rs]"]
  node_greeting["Player Greeting<br/>[latihan1.rs]"]
  node_balance_check["Balance Check<br/>[latihan1.rs]"]
end

subgraph group_ownership["Ownership Examples"]
  node_borrow_demo["Borrowing Review"]
  node_ownership_demo["Wallet Reference Demo"]
end

node_main_demo -->|"dispatches"| node_main_describe
node_trait_demo -->|"dispatches"| node_trait_impls
node_enum_demo -->|"formats"| node_status_format
node_basic_demo -->|"calls"| node_greeting
node_basic_demo -->|"calls"| node_balance_check
node_borrow_demo -->|"borrows string"| node_borrow_demo

click node_main_demo "https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/main.rs"
click node_main_describe "https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/main.rs"
click node_trait_demo "https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/bin/contoh_trait.rs"
click node_trait_impls "https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/bin/contoh_trait.rs"
click node_enum_demo "https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/bin/day03_enum.rs"
click node_status_format "https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/bin/day03_enum.rs"
click node_basic_demo "https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/bin/latihan1.rs"
click node_greeting "https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/bin/latihan1.rs"
click node_balance_check "https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/bin/latihan1.rs"
click node_borrow_demo "https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/bin/review_ownership.rs"
click node_ownership_demo "https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/bin/latihan2ownership.rs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main_demo,node_main_describe,node_trait_demo,node_trait_impls toneBlue
class node_enum_demo,node_status_format,node_basic_demo,node_greeting,node_balance_check toneAmber
class node_borrow_demo,node_ownership_demo toneMint
```

## Components

### Trait Examples

- [Wallet Trait Demo](https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/main.rs): `src/main.rs`
- [Wallet Describe](https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/main.rs): `src/main.rs`
- [Wallet NFT Demo](https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/bin/contoh_trait.rs): `src/bin/contoh_trait.rs`
- [Wallet NFT Descriptions](https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/bin/contoh_trait.rs): `src/bin/contoh_trait.rs`

### Basic Examples

- [Wallet Status Demo](https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/bin/day03_enum.rs): `src/bin/day03_enum.rs`
- [Status Formatter](https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/bin/day03_enum.rs): `src/bin/day03_enum.rs`
- [Greeting Balance Demo](https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/bin/latihan1.rs): `src/bin/latihan1.rs`
- [Player Greeting](https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/bin/latihan1.rs): `src/bin/latihan1.rs`
- [Balance Check](https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/bin/latihan1.rs): `src/bin/latihan1.rs`

### Ownership Examples

- [Borrowing Review](https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/bin/review_ownership.rs): `src/bin/review_ownership.rs`
- [Wallet Reference Demo](https://github.com/knowmefaiz/120-days-rust-journey/blob/main/src/bin/latihan2ownership.rs): `src/bin/latihan2ownership.rs`

## Connections

- Wallet Trait Demo → Wallet Describe: dispatches (evidence: `src/main.rs`)
- Wallet NFT Demo → Wallet NFT Descriptions: dispatches (evidence: `src/bin/contoh_trait.rs`)
- Wallet Status Demo → Status Formatter: formats (evidence: `src/bin/day03_enum.rs`)
- Greeting Balance Demo → Player Greeting: calls (evidence: `src/bin/latihan1.rs`)
- Greeting Balance Demo → Balance Check: calls (evidence: `src/bin/latihan1.rs`)
- Borrowing Review → Borrowing Review: borrows string (evidence: `src/bin/review_ownership.rs`)
