Returns the total number of bytes used by all non inlined views in all buffers. Note this does not account for views that point at the same underlying data in buffers For example, if the array has three strings views: View with length = 9 (inlined) View with length = 32 (non inlined) View with length = 16 (non inlined) Then this method would report 48
(&self)
| 714 | /// |
| 715 | /// Then this method would report 48 |
| 716 | pub fn total_buffer_bytes_used(&self) -> usize { |
| 717 | self.views() |
| 718 | .iter() |
| 719 | .map(|v| { |
| 720 | let len = *v as u32; |
| 721 | if len > MAX_INLINE_VIEW_LEN { |
| 722 | len as usize |
| 723 | } else { |
| 724 | 0 |
| 725 | } |
| 726 | }) |
| 727 | .sum() |
| 728 | } |
| 729 | |
| 730 | /// Compare two [`GenericByteViewArray`] at index `left_idx` and `right_idx` |
| 731 | /// |