-
Notifications
You must be signed in to change notification settings - Fork 83
Closed
Description
Internal sharing? -[no]--> Allocates? -[no]--> Internal mutability? -[no]--> Ownership? -[no]-----------------------------------> &mut T
\ \ \ `-[yes]----------------------------------> T
\ \ \
\ \ `-[yes]-> Thread-safe? -[no]--> Internal references? -[no]---> Cell<T>
\ \ \ `-[yes]--> RefCell<T>
\ \ \
\ \ `-[yes]-> Internal references? -[no]---> AtomicT
\ \ \ `-[one]--> Mutex<T>
\ \ `--[many]-> RwLock<T>
\ \
\ `-[yes]------------------------------------------------------------------------------------> Box<T>
\
`-[yes]-> Allocates? -[no]-------------------------------------------------------------------------------------> &T
\
`-[yes]-> Thread-safe? -[no]---------------------------------------------------------------> Rc<T>
`-[yes]--------------------------------------------------------------> Arc<T>
Reply
And, I have an interest to several suggestions for a correctness or details. But, the cheat-sheet favor to a newbiews, and the right columns is not a type, yes I know. I'll make an update with include these reddit users suggestions to the rev1 or a later.