Intro to Developing User-Defined Rust Structs 🦀

Ғылым және технология

Rust structs enable developers to define custom data types, with a variety of attributes describing the struct's state. Rust structs define zero or more "fields" which each contain data of a specified data type. Data types can include the core Rust data types, or user-defined types including enums or other struct definitions.
Rust structs are like blueprints of an object, whereas struct "instances" are unique occurrences of the blueprint. A struct can represent any real-world concept, such as a house, car, person, or any other entity. The fields and data types defined on each struct determine the "shape" of the data.
🤯 Rust Programming Playlist 🦀 • Rust Programming Tutor...
📖 Rust Structs: doc.rust-lang.org/book/ch05-0...
📖 Rust Cell Type: doc.rust-lang.org/std/cell/st...
Visual Studio Code ➡️ code.visualstudio.com
Rust Website ➡️ rust-lang.org
Rustup Installer ➡️ rustup.rs
Rust Docs ➡️ doc.rust-lang.org/book
Please follow me on these other social channels!
➡️ trevorsullivan.net
➡️ github.com/pcgeek86
➡️ / pcgeek86
➡️ / trevorsullivan
➡️ / trevorsoftware
➡️ tiktok.com/pcgeek86
All trademarks, logos and brand names are the property of their respective owners. All company, product and service names used in this website are for identification purposes only. Use of these names,trademarks and brands does not imply endorsement.
#rustlang #rust #rustdev #opensource #software #linux #devops #programming #rusty #dev #coding #codinglife #code #coder #ubuntu #ubuntulinux #appdev #developer

Пікірлер: 26

  • @TrevorSullivan
    @TrevorSullivan9 ай бұрын

    Check out the FULL Rust video playlist! 🦀 kzread.info/head/PLDbRgZ0OOEpUkWDGqp91ODn0dk7LPBAUL

  • @Exidiful
    @Exidiful8 ай бұрын

    If everyone know this channel. No one would ever say rust is hard. Thanks a lot mate, because of you Im finally figuring out rust and making real apps. Really appreciate it ❤

  • @TrevorSullivan

    @TrevorSullivan

    8 ай бұрын

    Wow, that is some high praise! That means a lot to me. Thank you, mate.

  • @vonmakeheat

    @vonmakeheat

    6 ай бұрын

    nah frfr he literally taught me the language in a day!!!

  • @mssafy2592

    @mssafy2592

    27 күн бұрын

    100% , I swear I've read the rust book and watched many courses and nothing like this playlist !!!!!!

  • @dabunnisher29
    @dabunnisher292 ай бұрын

    This whole Rust tutorial series is amazing. Thank you so much for all your hard work and time on it.

  • @TrevorSullivan

    @TrevorSullivan

    2 ай бұрын

    Thank you! It is a lot of work, but it's people like you who motivate me to keep on going. I appreciate your comment, and I'm glad you're learning Rust! 🥰🦀

  • @lordmelbury7174
    @lordmelbury71746 ай бұрын

    Cheers Trevor! - Subscribed!

  • @TrevorSullivan

    @TrevorSullivan

    6 ай бұрын

    😊 thank you for your support!! I hope this channel has been helpful for you.

  • @WanjikuKimani-pe8eh
    @WanjikuKimani-pe8eh12 күн бұрын

    You have amazing rust content🙌

  • @pratikkulkarni891
    @pratikkulkarni8917 ай бұрын

    Thank you! This was one of the most structured videos I have seen on this topic, appreciate it.

  • @hohojei1
    @hohojei19 ай бұрын

    I like your video as the explanation is clear~~ Thanks for the work

  • @DieDona
    @DieDona4 ай бұрын

    thank you!

  • @scottb4029
    @scottb40297 ай бұрын

    Thank you so much! I have been trying to get the idea of options to work in my head. I have awesome mentors but I just keep blocking. This broke it down!

  • @aintnochange
    @aintnochange6 ай бұрын

    Hi, thanks for the video! That Cell solution looks a bit complicated (for me), what if I just put the struct into a module, leave some fields private and then implement something like getPrivateField() for each of the fields? Is there something can go wrong?

  • @riigel
    @riigel3 ай бұрын

    everything is fine until 37:43 , I got lost on that 😂, excellent tutorial tho! thanks so much!

  • @TrevorSullivan

    @TrevorSullivan

    3 ай бұрын

    Lifetimes are definitely challenging to understand at first. Basically it's a way for a developer to declare how long a particular value needs to "live" for, relative to other values. At some point I'll need to make a dedicated video to this topic. I still can't figure out how to explain it in an easy to understand way! 😆

  • @riigel

    @riigel

    3 ай бұрын

    @@TrevorSullivan oh man! yes please! I've been struggling recently on lifetimes.. At first, I think I got it, then when I try it myself everything went south so fast 🤣

  • @Gj1118

    @Gj1118

    3 ай бұрын

    @@TrevorSullivan Please do so. Even I got lost at the exact same minute. Thanks a ton . Following this series quire religiously. Thanks once again.

  • @TrevorSullivan

    @TrevorSullivan

    3 ай бұрын

    @@Gj1118 thank you! If I ever figure out a good use case for specifying lifetimes, I'll do a video on that topic to clarify things. I hope you've learned something aside from that! I appreciate your support.

  • @anjonsarker2374
    @anjonsarker23749 ай бұрын

    Fine

  • @salaar-zj2ks
    @salaar-zj2ksАй бұрын

    Did you made any video on liferimes?

  • @TrevorSullivan

    @TrevorSullivan

    Ай бұрын

    Hi there! No I have not made any videos dedicated to lifetimes yet. Thanks for checking!

  • @salaar-zj2ks

    @salaar-zj2ks

    Ай бұрын

    @@TrevorSullivan Can you please make one on Lifetimes and Futures topics

  • @TrevorSullivan

    @TrevorSullivan

    Ай бұрын

    @@salaar-zj2ks I already have a video on async futures! Actually two videos. I will certainly consider making one on lifetimes. I know that some other creators have already covered this topic fairly well.

  • @salaar-zj2ks

    @salaar-zj2ks

    Ай бұрын

    @@TrevorSullivan great thanks for your efforts

Келесі