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 ce6b880 commit 733ae1bCopy full SHA for 733ae1b
uefi/src/mem/aligned_buffer.rs
@@ -69,6 +69,16 @@ impl AlignedBuffer {
69
self.layout.size()
70
}
71
72
+ /// Returns an iterator over the aligned buffer contents.
73
+ pub fn iter(&self) -> impl Iterator<Item = &u8> {
74
+ self.as_slice().iter()
75
+ }
76
+
77
+ /// Returns a mutable iterator over the aligned buffer contents.
78
+ pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut u8> {
79
+ self.as_slice_mut().iter_mut()
80
81
82
/// Fill the aligned memory region with data from the given buffer.
83
///
84
/// The length of `src` must be the same as `self`.
0 commit comments