9 Rust Best Practices with Real Lib (part 1/3)

Published: 23 July 2024
on channel: Jeremy Chone
11,291
622

Here are 9 Rust Programming best practices I am using when building a library. We will use a real library, genai, as an example.

GitHub (at v0.1.5, this video code version): https://github.com/jeremychone/rust-g...

Part 1 (this one):    • 9 Rust Best Practices with Real Lib (...  
Part 2:    • 9 Rust Best Practices - Utils, Exampl...  
Part 3:    • 9 Rust Best Practices - Async, Projec...  

This is part of a 3-part series, and in this episode, we will focus on the following Rust Programming best practices,

1) Module Structure - Rust Nampespacing, Scoping and code orgnaization
2) Rust Error Handling practices
3) Rust Constructors, chainable setters, and builder patterns and best practices.

00:00 - Intro
00:10 - c01: Module Structure
06:14 - c02: Error Handling
11:57 - c03: (a) Constructors, Builders, Setters
22:45 - c03: (b) Constructors/builders Code example

== Jeremy Chone:

Discord general-rust -   / discord  
Discord rust10x -   / discord  
Patreon -   / jeremychone   - Any help is a big help (for Rust educational content)
Twitter -   / jeremychone  

https://britesnow.com - BriteSnow is my enterprise consulting company I have been running for 15 years. We help enterprises build and modernize next-gen applications. Feel free to send an email to [email protected] if you have any questions.


Big thanks to CrabNebula (https://crabnebula.dev/) for sponsoring this channel.

== Jeremy Chone Rust Video Playlists:

Rust AI Programming Series:    • JC - Rust & AI Programming  
Rust Web App Production Coding Series:    • JC - Rust Production Coding - Web App...  
Rust For Desktop App:    • JC - Rust Programming for Desktop App  
Everything Rust Programming - Tutorials, Courses, Tips, Examples:    • JC - Rust - Everything Rust Programmi...  
Rust Programming for Web Development:    • JC - Rust Programming for Web Develop...  
Rust Courses:    • Rust Course 2021 by the book | RustLang  
Rust for Java Developers:    • Rust for Java Developers  


Watch video 9 Rust Best Practices with Real Lib (part 1/3) online without registration, duration hours minute second in high quality. This video was added by user Jeremy Chone 23 July 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 11,29 once and liked it 62 people.