You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
infographic list-grid-badge-card
data
title Closures and Iterators in Rust
desc Summary of Rust Course Chapter 4.2
lists
- label Closure Basics
desc Anonymous functions that capture variables from the scope where they are invoked.
icon code circle
- label Closure in Struct
desc Store closures as struct fields using Fn trait bounds.
icon box package
- label Three Fn Traits
desc FnOnce, FnMut, and Fn control how closures capture variables: ownership, mutable borrow, or immutable borrow.
icon layers
- label Closure as Return Value
desc Use impl Trait or Box<dyn Fn> to return closures of unknown size.
icon corner up right
- label Iterator Basics
desc Collections implement IntoIterator to produce iterators via into_iter, iter, or iter_mut.
icon list
- label Iterator Trait
desc Implement the next method to define how values are retrieved, returning Option<Item>.
icon document text
- label Consumers and Adapters
desc Consumers like sum and collect consume iterators; adapters like map, filter, zip, and enumerate chain lazily.
icon filter
theme
palette #ce422b #e8a33d #4f46e5 #10b981
Activity