-
How to create a cyclic reference with Arc and Weak?코딩Coding/★Rust★기초★Syntax 2023. 9. 10. 13:47728x90
https://stackoverflow.com/questions/50425910/how-to-create-a-cyclic-reference-with-arc-and-weak
How to create a cyclic reference with Arc and Weak?
I have two structs: struct A { map: HashMap<u32, Vec<B>>, } struct B { weak: Weak<A> } When A is constructed, it will own several B, each of which links back to the A ...
stackoverflow.com
반응형'코딩Coding > ★Rust★기초★Syntax' 카테고리의 다른 글
Rust❤그리면서 읽히는 Turtle 그려보면서 코드를 익히자 (0) 2023.09.16 How to draw a pixel to the screen ? (0) 2023.09.16 Teaching Rust in 5 days (0) 2023.09.14 What's the difference between Arc<Mutex<_>> and std::sync::atomic::Atomic_? (0) 2023.09.10 Rust❤How would I store hexedecimal values in a variable? (0) 2023.09.06 Rust by Example Read-Through(All of Rust) | timClicks (0) 2023.09.04 파이썬 개발자의 위한 러스트 배우기 좋은 eBook(Rust Tutorial) (0) 2023.08.17 Rust❤️Adding Text to an SDL Canvas using Rust | Electro Cat Studios (0) 2023.08.17