Conversation
Notices
-
Embed this notice
jb55 (32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245@mostr.pub)'s status on Saturday, 16-Dec-2023 01:28:37 JST jb55
#Rust is one of the only languages where you can tie the lifetime of an object to another one. This ‘a thing is a lifetime parameter that says “Note must not outlive Transaction”. Which is incredibly useful since in #nostrdb the pointer to the memory-mapped data is only valid as long as the transaction exists. This is enforced at compile time, making data-read-outside-of-transaction crashes impossible.
gm #nerdstr
https://cdn.jb55.com/s/31256b0e5dc9bd93.png- Alex Gleason likes this.