摘要:
We use spawnto create a new thread: use std::thread; use std::time::Duration; fn main() { thread::spawn(|| { for i in 1..10 { println!("hi number {} f 阅读全文
摘要:
// Using catch-all error types like `Box<dyn error::Error>` isn't recommended // for library code, where callers might want to make decisions based on 阅读全文
摘要:
use std::error; use std::fmt; use std::num::ParseIntError; fn main() -> Result<(), Box<dyn error::Error>> { let pretend_user_input = "42"; let x: i64 阅读全文
摘要:
Here is how typescript does the same thing export type Data = { projector: { //pwd [key: string]: { // key -> value [key: string]: string, } } } Here 阅读全文