0013.5 가볍게 정리한 러스트 언어 특징들 🦀
- 0013 Rust 🦀#
- Returning a Reference to the Stack
- Mutable reference is a non Copy type
- derive attribute
- impl is not method, is associated function
- diff between const with static in rust
- Option의 unwrap 메서드는 소유권을 가져간다
- unsafe pointer
- From과 Into Trait를 사용하여 유연한 캐스팅 지원하기
- FromStr 을 구현하면 파싱을 공통적인 방법으로 수행할 수 있다고
- 자식 모듈은 부모 모듈의 private 요소들을 자유롭게 접근할 수 있다
- Multiple Patterns and match guards
- vector init with size, not capacity
- Ord is total order, PartialOrd is partial order
- single field struct, enum with repr transparent
- derivable traits and trait inheritance
- rc try_unwrap
- values in a scope are dropped in the opposite order they are defined
- thread safety with Arc which violates interior mutability
- is there a way to iterate through the values of an enum
- iterator skip
- idiomatic way to input from stdin when CP in rust
- idiomatic way to output to stdout when CP in rust
- slice patterns and destructure and refutability
- [[Blanket impl]]
- generic array in rust
- array_zip is unstable
- Negative bounds
- exception safety with rust
- Debug trait and DebugList builder and DebugStruct builder etc
- compare two iterators
- Hasher에게 먹이 주기 feed Hasher
-
book 읽다가 생각난 것들
- trim
- unit type
- array
- Statements and Expressions
- let 변수 선언만 해도 되나요
- loop label
- Box
- immutable to mutable
- Permission Handling
- static lifetime
- lifetime elision
- Deref trait
- immutable reference is copyable, mutable reference is not copyable
- How to add between different types - rust
- Using the Newtype Pattern to Implement External Traits on External Types
- MIRI - Mid-level Intermediate Representaion Interpreter
-
different with other languages like c c++