An object that manages the buffers underlying a Cap’n Proto message reader.
Gets the segment with index
idx is out of range.
The segment must be 8-byte aligned or the “unaligned” feature must be enabled in the capnp crate. (Otherwise reading the segment will return an error.)
The returned slice is required to point to memory that remains valid until the ReaderSegments object is dropped. In safe Rust, it should not be possible to violate this requirement.
Gets the number of segments.