- Difference between string and string slice in Rust:
let string = String::from("127.0.0.1:8080");
let string_slice = &string[10..];
println!("{}", string_slice);
-
Ownership, Borrowing, References: Three ownership rules in Rust: a. Each value in Rust is owned by a variable. b. When the owner goes out of scope, the value will be deallocated. c. There can only be ONE owner at a time. Borrowing: a. Can ownership be borrowed?
-
How does unwrap() work in Rust?
-
How does Heap and Stack allocation work in Rust?
03/26:
- How are structs, strings, enums and option enums defined and used in Rust?
- How do we use the match expression?
- What are traits in Rust, eg: TryFrom, From? How do we define and use them? Use cases?
- What is Option, Result in Rust? Converting an Option into a Result.
- What is if let expression?
- What is lifetimes in Rust?
03/27:
- How do we use the derive attribute to implement Debug trait on all types.
- What are public associated functions?
- What are copy and clone traits?
- How do read and write traits work for types like TcpStream, Vector, files.
- What's the difference between static and dynamic dispatch in Rust?
- How do we create custom traits in Rust for handling static files associated with your frontend.
- How do we work with env variables in Rust?