サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
体力トレーニング
ricardomartins.cc
Key takeaways The traits in std::convert provide a uniform API for converting values to other types From<T> and Into<U> are for conversions that cannot fail and consume the original value From<T> for U converts a value of type T into one of type U Into<U> for T inverts From<T>’s subject-object relationship Implementing From<T> for U gives us an automatically derived Into<U> for T implementation Tr
Interior mutability in Rust, part 3: behind the curtain Key takeaways UnsafeCell is the keystone for building interior mutability types (Cell, RefCell, RwLock and Mutex) UnsafeCell wraps around a value and provides a raw mutable pointer to it It depends on a special compiler path that avoids undefined behavior related to the raw pointer It lacks synchronization primitives and has a very bare-bones
08 Jun 2016 Rust is like doing parkour while suspended on strings & wearing protective gear. Yes, it will sometimes look a little ridiculous, but you’ll be able to do all sorts of cool moves without hurting yourself. – llogiq on reddit Key takeaways Interior mutability is when you have an immutable reference (&T) but you can mutate the destination It’s useful when you need mutable fields inside im
このページを最初にブックマークしてみませんか?
『ricardomartins.cc』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く