- Ownership Rules
- Move
- Copy
- 함수 인자 전달
- 함수 반환값 전달
- Reference
- Mutable Reference
- Slice
- Struct
- Method
- Automatic referencing and dereferencing
- Associated Functions
- Enum
- Enum Method
- Important Enum: Option
- Match
- if let
- Package 와 Crate
-
Module
- use
- Separating Modules into Different Files
-
Collections
-
Error
- dereferencing coercion
- main function return type
- for
-
Generic
-
Trait
-
Lifetime
-
Automated Tests
-
Controlling Test
-
Test Organization
- derive attribute
-
I/O Project
- First Try
- Separation of Concerns
- Extracting the Argument Parser
- Grouping Values
- Creating constructor for Config
- Improving Error Handling
- Returning a Result from new Instead of Calling panic!
- Calling Config::new and Handling Errors
- Extracting Logic from main
- Returning Errors from the run Function
- Handling Errors Returned from run in main
- Splitting Code into a Library Crate
-
Developing the Library’s Functionality with Test-Driven Development
-
Working with Environment Variables
- 표준 에러 스트림
- Functional Language Features: Iterators and Closures
-
Closures
-
Iterator
- Improving Our I/O Project
-
More About Cargo and Crates.io
- Cargo Workspaces
- Smart Pointers
-
Box
-
Treating Smart Pointers Like Regular References with the Deref Trait
-
Running Code on Cleanup with the Drop Trait
- Dropping a Value Early with std::mem::drop
- Rc, the Reference Counted Smart Pointer
- RefCell and the Interior Mutability Pattern
- Interior Mutability: A Mutable Borrow to an Immutable Value
- A Use Case for Interior Mutability: Mock Objects
- Having Multiple Owners of Mutable Data by Combining Rc and RefCell
- Reference Cycles Can Leak Memory
-
Concurrency
- Extensible Concurrenty (Sync and Send Trait)
-
OOP
-
Using Trait Objects That Allow for Values of Different Types(Polymorphism)
- Implementing an Object-Oriented Design Pattern
- Patterns and Matching
-
All the Places Patterns Can Be Used
- Refutability: Whether a Pattern Might Fail to Match
-
Pattern Syntax
- Matching Literals
- Matching Named Variables
- Multiple Patterns
- Matching Ranges of Values with ..=
- Destructuring to Break Apart Values
- Destructuring Enums
- Destructuring Structs and Tuples
- _ 패턴
- Ignoring an Unused Variable by Starting Its Name with _
- Ignoring Remaining Parts of a Value with ..
- Extra Conditionals with Match Guards
- @ Bindings
- Advanced Features
-
Unsafe Rust
- Advanced Traits
-
Specifying Placeholder Types in Trait Definitions with Associated Types
- Default Generic Type Parameters and Operator Overloading
- Fully Qualified Syntax for Disambiguation: Calling Methods with the Same Name
- Using Supertraits to Require One Trait’s Functionality Within Another Trait
- Using the Newtype Pattern to Implement External Traits on External Types
- Using the Newtype Pattern for Type Safety and Abstraction
- Creating Type Synonyms with Type Aliases
- The Never Type that Never Returns
- Dynamically Sized Types and the Sized Trait
- Advanced Functions and Closures
-
Function Pointers
-
Macros