Serialize an object directly to a writable stream. Notes: The stream must be a non-retaining sink: ``write(data)`` must synchronously consume ``data`` before returning. Fory may reuse or modify the underlying buffer after ``write`` returns, so re
(self, obj, stream)
| 763 | return self.deserialize(buffer, buffers, unsupported_objects) |
| 764 | |
| 765 | def dump(self, obj, stream): |
| 766 | """ |
| 767 | Serialize an object directly to a writable stream. |
| 768 | |
| 769 | Notes: |
| 770 | The stream must be a non-retaining sink: ``write(data)`` must |
| 771 | synchronously consume ``data`` before returning. Fory may reuse or |
| 772 | modify the underlying buffer after ``write`` returns, so retaining |
| 773 | the passed object (or a view of it) is unsupported. If your sink |
| 774 | needs retention, copy bytes inside ``write``. |
| 775 | """ |
| 776 | fory = self._get_fory() |
| 777 | try: |
| 778 | return fory.dump(obj, stream) |
| 779 | finally: |
| 780 | self._return_fory(fory) |
nothing calls this directly
no test coverage detected