Lifetime in Rust
How lifetimes work in Rust, and what their main uses are 2 posts - 2 participants Read full topic
Community stream
How lifetimes work in Rust, and what their main uses are 2 posts - 2 participants Read full topic
Hello developers, new borrow checker feature Every function should have a metadata describing what fields or sub fields down the tree it modifies or reads from it's &mut parameters. The borrow checker could use this information to be more permissive…
The test suite I have to test my email sending and querying with an email API provider returns 429 too many requests when I run them one after the other in a short amount of time. Even when I run the tests with cargo test -- --test-threads = 1 to…
The EU Cyber Resilience Act (CRA) specifies, that Security relevant events must be logged unless explicitly opted out by the user. We're currently using the log crate with env_logger, and I couldn't find a way for how to determine security relevant…
Hi folks, I'm nearing the end of a major overhaul to what has become quite a large library (redbook for handling cd audio). The crate covers 3 key domains: hardware access logical representation of a CD (named tracks etc. - all the stuff that would…
Simple question. I have a Value which contains a non-strict json value which can be any nested structure. If I get an object property using my_value.get(index), does it clone or return a reference? 3 posts - 2 participants Read full topic
I need install a packege how to curl in linux, I need to install a package such as Curl on Linux, but the problem is that when it comes to installing it, I don’t know how to enter the superuser password when prompted. Here is the function I’m using.…
I was doing some FFI wrapping and saw this note in the CStr::from_ptr documentation (CStr in std::ffi - Rust): The nul terminator must be within isize::MAX from ptr Because malloc and objects in C generally use size_t which is equivalent to…
I've been hacking on an experimental proof-of-concept port of serde using colorless, exploring what it looks like when serialization and deserialization can operate across sync (Identity) and Async execution modes—including when the type being…
pls explain this program behaviours 1st program is compiled 2nd program won't compiled 1st program link 2nd program link 2 posts - 2 participants Read full topic
This is perhaps less rust related than should be asked here. If so, let me know and I'll post it elsewhere. I have been following the common advice that one of the better ways of learning a language is starting a project on it. Rust is the first…
444 items available