Comprehensive Rust(繁体中文) 2024069.2 迷途參照 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 9.3 練習:幾何圖形 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 9.3.1 解決方案 . . . . . . . segment should take about 35 minutes. It contains: Slide Duration 共用列舉 10 minutes 迷途參照 10 minutes 練習:幾何圖形 15 minutes 9.1 共用列舉 所謂參照,是一種可存取另一值而不對該值負責的方法,也稱為「借用 (borrowing)」。共用的參照僅供唯 讀,且其參照的資料無法變更。 fn main() different values, while the second represents an exclusive reference to a mutable value. 9.3 練習:幾何圖形 我們會建立幾個 3D 幾何圖形的公用函式,將點表示為 [f64;3]。函式簽章則由您自行決定。 // Calculate the magnitude of a vector by summing the squares0 码力 | 356 页 | 1.41 MB | 1 年前3
共 1 条
- 1













