Skip to content
0:00 / 0:00

#rust#statepattern#typestate

State Design Pattern in Rust

Let's Get Rusty

177K subscribers • 8 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.

Intermediate. Assumes working knowledge.

59K views5 years ago1 recommendation

Software designProgramming languagesRustDesign patternsSoftware architecture

An explanation of implementing the classic object-oriented state design pattern in Rust and encoding states using the type system.

Join our Rust Live Accelerator waitlist (free Rust Job-Ready Roadmap inside): letsgetrusty.com/join Let’s Get Rusty is the #1 Rust education & career development platform for engineers who want real-world skills and results. We combine a structured curriculum, industry-grade projects, expert review and feedback, and our Rust recruiter network — to help you master Rust and get hired. · The ultimate Rust lang tutorial. Follow along as we go through the Rust lang book chapter by chapter. 📝 Get notified when the Rust Cheatsheet comes out: letsgetrusty.com/cheatsheet The Rust book: doc.rust-lang.org/stable/book/​​ Chapters: ​ Intro Object-Oriented Design Pattern Defining Post Storing Text Content Method Requesting a Review Adding the Approve Method Trade-offs of the State Pattern Encoding States and Behavior as Types Outro #letsgetrusty​​ #rust​lang​ #tutorial

Why it's here

1 person recommends this

What people say. Recommended as an inspiring resource for understanding Rust's type system and design patterns.

u/didave31in r/rust • Recommends

On “Design pattern/guidelines to architecture Rust code”

Recently I came to realize the advantages of the type system and the borrow checker and that they really seem to set Rust apart from other languages. Four inspiring resources + Bonus Links: 1. Rust State Design Pattern link to this video 2. Type-Driven API Design in Rust link to this video 3. The Typestate Pattern in Rust http://cliffle.com/blog/rust-typestate/ 4. Compile-Time Social Coordination link to this video **** Bonus (Yet to read them) **** a. https://willcrichton.net/rust-api-type-patterns/introduction.html b. https://rust-lang.github.io/api-guidelines/type-safety.html c. https://rust-unofficial.github.io/patterns/patterns/behavioural/newtype.html d. https://doc.rust-lang.org/embedded-book/static-guara…