lightningdevkit / rust-lightning

A highly modular Bitcoin Lightning library written in Rust. It's rust-lightning, not Rusty's Lightning!
Other
1.15k stars 363 forks source link

Define a separate trait for reading objects that know when to stop vs not #3292

Open TheBlueMatt opened 3 weeks ago

TheBlueMatt commented 3 weeks ago

We currently have one trait (Readable) for reading objects with two totally different semantics - objects may know when to stop reading cause they have length descriptors and some objects may not (cause they just read to end). We should really have two different traits for the two types of objects cause its unsafe to confuse them.