borrowing_exerci

Crates.ioborrowing_exerci
lib.rsborrowing_exerci
version0.4.51
sourcesrc
created_at2019-10-22 17:28:43.117528
updated_at2019-12-04 12:18:41.053411
descriptionhow to understand the borrowing in rust
homepagehttps://crates.io/crates/borrowing_exerci
repositoryhttps://github.com/cnruby/learn-rust-by-crates/tree/master/hello-borrowing
max_upload_size
id174715
size300,126
Gudao Luo (cnruby)

documentation

https://cnruby.github.io/learn-rust-by-crates/hello-borrowing/borrowing_exerci/

README

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

Commit count: 0

cargo fmt