AWW3HMEVLO6Y3I5WC6GU2KAC5CPKRXBAYPXCYX3XTCJ5CTIDLXHAC
54WHP3Z24UIN6DDYGYQFWLSTEI2DQ66MQN334VUHSAXDC67UXMMAC
W4IAZWGKQDDFZOU3KD52ZBRMGA5LLSO33JJHQUYH2TCT6OCHPWSQC
Z5WCQLAHVRIRZRE6K3AO6IP7Y5F4AMAMA6Q7U4ANGHA5TUCNOC2QC
IOHM3NIST5FMQDSRXXXOBNK2DKQKHDFB4YWJWRB6B2ROWVB7W75QC
VXKHXMQLNMD7OG4CKSZTX75WMHYTGXJG7AL7YTQBMI2WJ3GQC6JQC
HL3B7CBVIFOE5UDQ4PFYFLTSHWY6ITXMWSLNKFAI7QQHLD5GRF2AC
/// Wraps a mutable reference to a buffer and implements an `Iterator` returning
/// elements in `State::Ready`. Commonly instantiated by `buffer.iter()`.
pub struct BufferIter<'a, B: Get>(&'a mut B);
impl<'a, B: Get> Iterator for BufferIter<'a, B> {
type Item = B::Data;
fn next(&mut self) -> Option<Self::Item> {
match self.0.get() {
State::Ready(data) => Some(data),
_ => None,
}
}
}