pub fn serialize_with_capacity(
events: &mut VecDeque<(Event, JsonSize)>,
) -> Result<(Vec<Event>, Vec<u8>, GroupedCountByteSize), Error>
Expand description
Serialize events into a buffer as a JSON array that has a maximum size of
MAX_PAYLOAD_BYTES
.
Returns the serialized events, the buffer, and the byte size of the events.
Events that are not serialized remain in the events
parameter.