Rust 的 crate/super/self 關係

假設 rust_hello_world 的目錄架構長這樣:(範例源自於我手邊的某個 production 專案) rust_hello_world Cargo.toml src cli opt.rs lib.rs cli.rs logger.rs 「crate」概括來說就是一個專案,用 Cargo.toml 區分。每個 mod 都是一個層級,super 就是上個層級,sel...

發布於 Developments

本站由 @pan93412 使用 Stellar 主題建立。
本 blog 所有文章除特別聲明外,均採用 CC BY-NC-SA 4.0 授權條款,轉載請標明出處。