#learn #progress #crates #work #borrowing

bin+lib borrowing_exerci

how to understand the borrowing in rust

13 unstable releases (3 breaking)

✓ Uses Rust 2018 edition

0.4.51 Dec 4, 2019
0.4.50 Dec 4, 2019
0.3.53 Nov 8, 2019
0.3.50 Oct 29, 2019
0.1.0 Oct 22, 2019

#108 in Testing

Download history 75/week @ 2020-01-18 3/week @ 2020-02-01 14/week @ 2020-02-08 35/week @ 2020-02-15 43/week @ 2020-02-22 26/week @ 2020-03-07 16/week @ 2020-03-14 40/week @ 2020-03-21 18/week @ 2020-03-28 14/week @ 2020-04-04 78/week @ 2020-04-11 1/week @ 2020-04-25 13/week @ 2020-05-02

95 downloads per month

MIT/Apache and LGPL-3.0-or-later

105KB
2.5K SLoC

Minimum rustc version GitHub release The Crate mod_trait_exerci Code Build Status on appveyor.com GitHub issues Twitter URL

The Rust Feature Borrowing and Ownenship

Getting Started

cargo install cargo-script
cargo install bat

Project

  • name: hello-borrowing
  • crate name: borrowing_exerci
  • description: how to understand the rust borrowing

Subproject: bin-hello

  • folder name: bin-hello
  • description: the crate 'borrowing_exerci'

install the crate borrowing_exerci

cargo install borrowing_exerci

Use the crate borrowing_exerci help

bw -h

List all commands with features for code

bw -c <code>

# example:
bw -c closure_immut_string

Run the code with a feature

  • run a rust file with a feature
bw -c <code> -f <feature> | bat -l rs

# example "closure_immut_string" with a feature "ok":
bw -c closure_immut_string -f ok | bat -l rs
# tip: `f`, Forward  one window
# tip: `b`, Backward  one window
# tip: `q`, Exit.

# example "closure_immut_string" with a feature "err_01":
bw -c closure_immut_string -f err_01 | bat -l rs
# tip: `f`, Forward  one window
# tip: `b`, Backward  one window
# tip: `q`, Exit.

Resources

Dependencies

~24MB
~505K SLoC