Module stringsext::finding_collection
source · Structs§
FindingCollection
is a set of orderedFinding
s. The boxoutput_buffer_bytes
and the structFinding
are self-referential, becauseFinding.s
points intooutput_buffer_bytes
. Therefore, special care is taken that,output_buffer_bytes
is protected from being moved in memory:- This allows iterating over
Finding
-objects in aFindingCollection::v
. The state of this iterator must hold the wholeFindingCollection
and not onlyFindingCollection::v
! This is required becausenext()
produces a link toFinding
, whose memberFinding::s
is a&str
. The content of this&str
is part ofFindingCollection::output_buffer_bytes
, thus the need for the whole objectFindingCollection
.