Flush this decoder returning the parsed [`Block`] if any
(&mut self)
| 128 | |
| 129 | /// Flush this decoder returning the parsed [`Block`] if any |
| 130 | pub fn flush(&mut self) -> Option<Block> { |
| 131 | match self.state { |
| 132 | BlockDecoderState::Finished => { |
| 133 | self.state = BlockDecoderState::Count; |
| 134 | Some(std::mem::take(&mut self.in_progress)) |
| 135 | } |
| 136 | _ => None, |
| 137 | } |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | #[cfg(feature = "async")] |