Parse the binary encoded Protobuf into this message instance. This returns the instance itself and is therefore assignable and chainable. Parameters ----------- data: :class:`bytes` The data to parse the message from. Returns ---
(self: T, data: bytes)
| 1349 | return self |
| 1350 | |
| 1351 | def parse(self: T, data: bytes) -> T: |
| 1352 | """ |
| 1353 | Parse the binary encoded Protobuf into this message instance. This |
| 1354 | returns the instance itself and is therefore assignable and chainable. |
| 1355 | |
| 1356 | Parameters |
| 1357 | ----------- |
| 1358 | data: :class:`bytes` |
| 1359 | The data to parse the message from. |
| 1360 | |
| 1361 | Returns |
| 1362 | -------- |
| 1363 | :class:`Message` |
| 1364 | The initialized message. |
| 1365 | """ |
| 1366 | with BytesIO(data) as stream: |
| 1367 | return self.load(stream) |
| 1368 | |
| 1369 | # For compatibility with other libraries. |
| 1370 | @classmethod |