Module stringsext::finding_collection[][src]

Structs

FindingCollection is a set of ordered Finding s. The box output_buffer_bytes and the struct Finding are self-referential, because Finding.s points into output_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 a FindingCollection::v. The state of this iterator must hold the whole FindingCollection and not only FindingCollection::v! This is required because next() produces a link to Finding, whose member Finding::s is a &str. The content of this &str is part of FindingCollection::output_buffer_bytes, thus the need for the whole object FindingCollection.