Posts avec #Rustprogramming

#Rustprogramming

Les posts publics sur X qui utilisent #Rustprogramming.

Hashtags associés

  1. HIM 🎖️🪖@ManlikeAkin_47
    2. Option::map — transform a value if it exists Concept: Transform the value inside an Option without manually matching every case. map() applies a function to the value inside Some. If the original value is None, the result remains None.
    HIM 🎖️🪖 @ManlikeAkin_47
    1. VecDeque — build a queue Concept: A double-ended queue lets you add and remove elements from either end. push_back() adds an item to the end, while pop_front() removes the oldest item. This is useful for queues and task scheduling.
    10121
  2. HIM 🎖️🪖@ManlikeAkin_47
    1. VecDeque — build a queue Concept: A double-ended queue lets you add and remove elements from either end. push_back() adds an item to the end, while pop_front() removes the oldest item. This is useful for queues and task scheduling.
    Télécharger
    HIM 🎖️🪖 @ManlikeAkin_47
    1. if expressions — conditions return values Concept: In Rust, if can be used to assign a value. Unlike a traditional statement-only approach, Rust's if is an expression that produces a value. Both branches must return compatible types.
    10012
  3. HIM 🎖️🪖@ManlikeAkin_47
    @ManlikeAkin_47
    value. The closure itself must be declared mut because calling it requires mutable access to its captured state.
    100
  4. Abiria@Abiria14
    Coding Lab에서 2025년 연말 Rust 스터디 참가자를 모집하고 있습니다! 어렵게 느껴졌던 Rust, 다양한 실습 프로젝트와 함께 직접 작성하고 실험하며 공부해 볼까요? ▶ Coding Lab 참여하기: ▶ Rust 스터디 저장소: #rust #rustprogramming
    Télécharger
    034766
  5. HIM 🎖️🪖@ManlikeAkin_47
    1. Arc<T> — share ownership across threads Concept: Atomically reference-counted shared ownership. Arc<T> allows multiple threads to share ownership of the same data safely. Unlike Rc<T>, Arc<T> uses atomic reference counting and is suitable for multithreaded programs.
    Télécharger
    HIM 🎖️🪖 @ManlikeAkin_47
    1. Async/Await — write asynchronous functions Concept: Asynchronous programming with Rust. async defines an asynchronous function, while .await waits for its future to produce a result. Rust requires an asynchronous runtime, such as Tokio, to execute this program.
    1008
  6. HIM 🎖️🪖@ManlikeAkin_47
    1. Async/Await — write asynchronous functions Concept: Asynchronous programming with Rust. async defines an asynchronous function, while .await waits for its future to produce a result. Rust requires an asynchronous runtime, such as Tokio, to execute this program.
    Télécharger
    HIM 🎖️🪖 @ManlikeAkin_47
    1. find() — search for an element in a collection Concept: Find the first element that satisfies a condition. find() returns the first matching element as an Option. It returns None if no element satisfies the condition.
    10116
  7. HIM 🎖️🪖@ManlikeAkin_47
    @ManlikeAkin_47
    4. filter_map() — filter and transform simultaneously Concept: Filter out unwanted values while transforming the remaining elements. parse() returns a Result. The .ok() converts it into an Option, and filter_map() keeps only successful conversions.
    1002
  8. HIM 🎖️🪖@ManlikeAkin_47
    1. Default trait — create a default instance Concept: Provide sensible default values for a custom struct. #[derive(Default)] automatically implements the Default trait for this struct because .
    Télécharger
    HIM 🎖️🪖 @ManlikeAkin_47
    1. Box<T> — store data on the heap Concept: A Box<T> owns a value stored on the heap. Box::new() creates a box that owns its value on the heap. Rust automatically cleans it up when the box goes out of scope.
    10117
  9. HIM 🎖️🪖@ManlikeAkin_47
    1. Box<T> — store data on the heap Concept: A Box<T> owns a value stored on the heap. Box::new() creates a box that owns its value on the heap. Rust automatically cleans it up when the box goes out of scope.
    Télécharger
    HIM 🎖️🪖 @ManlikeAkin_47
    2. Option::map — transform a value if it exists Concept: Transform the value inside an Option without manually matching every case. map() applies a function to the value inside Some. If the original value is None, the result remains None.
    10125
  10. HIM 🎖️🪖@ManlikeAkin_47
    @ManlikeAkin_47
    Unlike println!(), which prints directly to the console, format!() returns a new String that you can store, modify, or pass to another function. Need to build a message dynamically? Rust's format!() combines variables and text into a reusable string.
    1007
  11. HIM 🎖️🪖@ManlikeAkin_47
    @ManlikeAkin_47
    Iterating over &scores borrows the map rather than consuming it. Remember that HashMap iteration order is not guaranteed, so the output order may vary.
    1002
  12. HIM 🎖️🪖@ManlikeAkin_47
    1. find() — search for an element in a collection Concept: Find the first element that satisfies a condition. find() returns the first matching element as an Option. It returns None if no element satisfies the condition.
    Télécharger
    HIM 🎖️🪖 @ManlikeAkin_47
    1. Default trait — create a default instance Concept: Provide sensible default values for a custom struct. #[derive(Default)] automatically implements the Default trait for this struct because .
    10115
  13. HIM 🎖️🪖@ManlikeAkin_47
    @ManlikeAkin_47
    thread::spawn() starts a new thread. join() waits for that thread to finish before the main thread continues. The exact ordering of the first messages can vary. Rust supports multithreading out of the box. With thread::spawn(), you can execute tasks
    1003
  14. HIM 🎖️🪖@ManlikeAkin_47
    1. if expressions — conditions return values Concept: In Rust, if can be used to assign a value. Unlike a traditional statement-only approach, Rust's if is an expression that produces a value. Both branches must return compatible types.
    Télécharger
    HIM 🎖️🪖 @ManlikeAkin_47
    1. Smart pointers — sharing data with Rc Concept: Rc<T> allows multiple owners of the same data in a single-threaded program. Rc::clone() creates another shared reference-counted owner without cloning the underlying String. Rc is designed for single-threaded use;
    10118
  15. HIM 🎖️🪖@ManlikeAkin_47
    1. Smart pointers — sharing data with Rc Concept: Rc<T> allows multiple owners of the same data in a single-threaded program. Rc::clone() creates another shared reference-counted owner without cloning the underlying String. Rc is designed for single-threaded use;
    Télécharger
    10125
  16. HIM 🎖️🪖@ManlikeAkin_47
    @ManlikeAkin_47
    Rust automatically calls drop() when _file goes out of scope. This example demonstrates the mechanism; real file handles generally use standard-library types that already manage cleanup.
    1001
  17. Afficher plus de posts