Storing something in a struct alongside its "owner"?

109 · Users Rust Lang · July 13, 2026, 8:24 p.m.
Summary
The post discusses the challenges of storing a struct in Rust that contains both resources and objects that must not outlive those resources. The author details an issue they encountered while trying to load textures into a state struct, facing complications with Rust's borrow checker. They explore approaches to managing lifetimes in Rust and express a desire to keep related objects together in one structure for simplicity.