We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07389e6 commit e6c6a7dCopy full SHA for e6c6a7d
1 file changed
src/chunk.rs
@@ -47,6 +47,12 @@ impl Chunk {
47
.extend(other.offsets.iter().map(|&(id, offset)| (id, base + offset)));
48
}
49
50
+ /// An iterator over the references of the top-level objects
51
+ /// of the chunk, in the order they appear in the chunk.
52
+ pub fn refs(&self) -> impl IntoIterator<Item = Ref> + '_ {
53
+ self.offsets.iter().map(|&(id, _)| id)
54
+ }
55
+
56
/// Renumbers the IDs of indirect objects and all indirect references in the
57
/// chunk and returns the resulting chunk.
58
///
0 commit comments