mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-03-31 09:42:11 +02:00
parent
6744822454
commit
69a62ba227
src/modules
@ -28,11 +28,15 @@ These document the item that contains them -- in this case, a module.
|
|||||||
//! This module implements the garden, including a highly performant germination
|
//! This module implements the garden, including a highly performant germination
|
||||||
//! implementation.
|
//! implementation.
|
||||||
|
|
||||||
/// Sow the given seed packets.
|
// Re-export types from this module.
|
||||||
fn sow(seeds: Vec<SeedPacket>) { todo!() }
|
pub use seeds::SeedPacket;
|
||||||
|
pub use garden::Garden;
|
||||||
|
|
||||||
// Harvest the produce in the garden that is ready.
|
/// Sow the given seed packets.
|
||||||
fn harvest(garden: &mut Garden) { todo!() }
|
pub fn sow(seeds: Vec<SeedPacket>) { todo!() }
|
||||||
|
|
||||||
|
/// Harvest the produce in the garden that is ready.
|
||||||
|
pub fn harvest(garden: &mut Garden) { todo!() }
|
||||||
```
|
```
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
@ -9,3 +9,11 @@ Paths are resolved as follows:
|
|||||||
2. As an absolute path:
|
2. As an absolute path:
|
||||||
* `crate::foo` refers to `foo` in the root of the current crate,
|
* `crate::foo` refers to `foo` in the root of the current crate,
|
||||||
* `bar::foo` refers to `foo` in the `bar` crate.
|
* `bar::foo` refers to `foo` in the `bar` crate.
|
||||||
|
|
||||||
|
A module can bring symbols from another module into scope with `use`.
|
||||||
|
You will typically see something like this at the top of each module:
|
||||||
|
|
||||||
|
```rust,editable
|
||||||
|
use std::collections::HashSet;
|
||||||
|
use std::mem::transmute;
|
||||||
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user