pub fn split_payload(payload: &[u8], max_segment_size: usize) -> Vec<Bytes>Expand description
Split a payload into segments of at most max_segment_size bytes.
Always returns at least one segment (possibly empty). If the payload would produce more than 256 segments (the BACnet sequence number limit), falls back to returning the entire payload as a single unsegmented segment.