Practice · Essentials
Drill this lesson at your own pace. Practice doesn't change your review schedule.
Keys
You want to rebind a key you never use. Open the editor's keymap.
two chords in a row
relay — server.rs
▾relay
▾src
·db.rs
·main.rs
·server.rs
·Cargo.toml
server.rsdb.rs
1use crate::db::Pool;
2
3pub struct Server {
4 pool: Pool,
5 port: u16,
6}
7
8impl Server {
9 pub fn new(pool: Pool) -> Self {
10 Self { pool, port: 8080 }
11 }
or press Enter