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: |

At a time when the Indian stock market is peaking and has rallied immensely compared to global markets, there are companies that have not performed in the last 10 years. These are definitely a minor portion of the market considering there are hundreds of stocks that have turned multibagger since 2020. What went wrong with these stocks? Reasons vary from corporate governance, sectoral weakness, company specific and so on. But the more important question is, are these stocks worth buying?

Rust from de


Telegram Rust
FROM USA