🧠 Rust 方法(method)總整理筆記 方法是一種「定義在型別上的函式」,我們可以透過 . 的方式呼叫。 ✅ 常見內建方法(built-in meth...
這邊補充一下前面變數類似的概念差異 ✅ 為什麼 Rust 有「變數遮蔽(shadowing)」這個名詞? let x = 5; let x = x + 1;...
這邊要總結一下變數的基本概念。 直接上程式碼說明。 #![allow(unused_variables)] const TOUCHDOWN_POINTS: i3...
🦀 Rust 數值型別 1️⃣ 整數型別(Integer Types) 📌 有符號整數(signed, 可以是負數) 型別 位元數 數值範圍 使用情境...