Telegram Group & Telegram Channel
🦀 Задача Rust:

У тебя есть две структуры — Parent и Child. Каждая должна хранить ссылку на другую.
Но есть условия:

Нельзя использовать Rc, Arc, RefCell, Box или unsafe
Только ссылки и lifetime'ы


struct Parent<'a> {
child: Option<&'a Child<'a>>,
}

struct Child<'a> {
parent: Option<&'a Parent<'a>>,
}

📌 Задача: создать обе структуры и связать их между собой.
📉 Компилятор тебе не простит ошибок во владении.

💡 Подсказка: подумай — возможно, это невозможно.

Задача не про реализацию, а про понимание ограничений Rust.

Кидай в чат свои варианты


@rust_code
🤔84🔥3🥰2



tg-me.com/rust_code/982
Create:
Last Update:

🦀 Задача Rust:

У тебя есть две структуры — Parent и Child. Каждая должна хранить ссылку на другую.
Но есть условия:

Нельзя использовать Rc, Arc, RefCell, Box или unsafe
Только ссылки и lifetime'ы


struct Parent<'a> {
child: Option<&'a Child<'a>>,
}

struct Child<'a> {
parent: Option<&'a Parent<'a>>,
}

📌 Задача: создать обе структуры и связать их между собой.
📉 Компилятор тебе не простит ошибок во владении.

💡 Подсказка: подумай — возможно, это невозможно.

Задача не про реализацию, а про понимание ограничений Rust.

Кидай в чат свои варианты


@rust_code

BY Rust


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/rust_code/982

View MORE
Open in Telegram


Rust Telegram | DID YOU KNOW?

Date: |

The Singapore stock market has alternated between positive and negative finishes through the last five trading days since the end of the two-day winning streak in which it had added more than a dozen points or 0.4 percent. The Straits Times Index now sits just above the 3,060-point plateau and it's likely to see a narrow trading range on Monday.

Mr. Durov launched Telegram in late 2013 with his brother, Nikolai, just months before he was pushed out of VK, the Russian social-media platform he founded. Mr. Durov pitched his new app—funded with the proceeds from the VK sale—less as a business than as a way for people to send messages while avoiding government surveillance and censorship.

Rust from ar


Telegram Rust
FROM USA