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

Telegram Auto-Delete Messages in Any Chat

Some messages aren’t supposed to last forever. There are some Telegram groups and conversations where it’s best if messages are automatically deleted in a day or a week. Here’s how to auto-delete messages in any Telegram chat. You can enable the auto-delete feature on a per-chat basis. It works for both one-on-one conversations and group chats. Previously, you needed to use the Secret Chat feature to automatically delete messages after a set time. At the time of writing, you can choose to automatically delete messages after a day or a week. Telegram starts the timer once they are sent, not after they are read. This won’t affect the messages that were sent before enabling the feature.

What is Secret Chats of Telegram

Secret Chats are one of the service’s additional security features; it allows messages to be sent with client-to-client encryption. This setup means that, unlike regular messages, these secret messages can only be accessed from the device’s that initiated and accepted the chat. Additionally, Telegram notes that secret chats leave no trace on the company’s services and offer a self-destruct timer.

Rust from hk


Telegram Rust
FROM USA