Skip to content

Commit 2e89e8c

Browse files
d-e-s-odanielocfb
authored andcommitted
Export MapKeyIter in public interface
Export the MapKeyIter type as part of the public interface. The type itself has always been public, it just couldn't be named. Improve ergonomics and documentation by exporting it properly. Signed-off-by: Daniel Müller <[email protected]>
1 parent 28191bf commit 2e89e8c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

libbpf-rs/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ pub use crate::map::Map;
112112
pub use crate::map::MapFlags;
113113
pub use crate::map::MapHandle;
114114
pub use crate::map::MapInfo;
115+
pub use crate::map::MapKeyIter;
115116
pub use crate::map::MapType;
116117
pub use crate::map::OpenMap;
117118
pub use crate::object::AsRawLibbpf;

libbpf-rs/src/map.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,7 @@ impl From<MapType> for u32 {
11081108
}
11091109
}
11101110

1111+
/// An iterator over the keys of a [`Map`].
11111112
#[derive(Debug)]
11121113
pub struct MapKeyIter<'a> {
11131114
map: &'a MapHandle,

0 commit comments

Comments
 (0)