Flushes the buffer and returns its contents.
(self)
| 99 | return not self.events |
| 100 | |
| 101 | def flush_buf(self) -> bytearray: |
| 102 | """ |
| 103 | Flushes the buffer and returns its contents. |
| 104 | """ |
| 105 | old = self.buf |
| 106 | self.buf = bytearray() |
| 107 | return old |
| 108 | |
| 109 | def insert(self, event: Event) -> None: |
| 110 | """ |