pub fn size(&self, buffers: bool) -> usize {
        let base_size = size_of::<Self>();

        // Total size of all decoded values in the column.
        let mut decoded_keys_size = self
            .entries
            .iter()
            .map(|k| match k {
                Some(v) =>  match buffers {
                    true => v.capacity(),
                    false => v.len(),
                },
                None => 0,
            } + size_of::<Option<String>>())
            .sum::<usize>();

        if buffers {
            decoded_keys_size +=
                (self.entries.capacity() - self.entries.len()) * size_of::<Option<String>>();
        }

        let encoded_ids_size = size_of::<u32>()
            * match buffers {
                true => self.encoded_data.capacity(),
                false => self.encoded_data.len(),
            };

        base_size + decoded_keys_size + encoded_ids_size
    }
/// A reasonable estimation of the on-heap size this encoding takes up.
/// If `buffers` is true then all allocated buffers in the encoding are
/// accounted for.
A reasonable estimation of the on-heap size this encoding takes up.
If `buffers` is true then all allocated buffers in the encoding are
accounted for.
A reasonable estimation of the on - heap size this encoding takes up . If ` buffers ` is true then all allocated buffers in the encoding are accounted for .
pub fn size(&self, buffers: bool) -> usize {
        let base_size = size_of::<Self>();
        // Total size of all decoded values in the column.
        let mut decoded_keys_size = self
            .entries
            .iter()
            .map(|k| match k {
                Some(v) =>  match buffers {
                    true => v.capacity(),
                    false => v.len(),
                },
                None => 0,
            } + size_of::<Option<String>>())
            .sum::<usize>();
        if buffers {
            decoded_keys_size +=
                (self.entries.capacity() - self.entries.len()) * size_of::<Option<String>>();
        }
        let encoded_ids_size = size_of::<u32>()
            * match buffers {
                true => self.encoded_data.capacity(),
                false => self.encoded_data.len(),
            };
        base_size + decoded_keys_size + encoded_ids_size
    }
pub fn size ( & self , buffers : bool ) -> usize { let base_size = size_of :: < Self > ( ) ; // Total size of all decoded values in the column. let mut decoded_keys_size = self . entries . iter ( ) . map ( | k | match k { Some ( v ) => match buffers { true => v . capacity ( ) , false => v . len ( ) , } , None => 0 , } + size_of :: < Option < String > > ( ) ) . sum :: < usize > ( ) ; if buffers { decoded_keys_size += ( self . entries . capacity ( ) - self . entries . len ( ) ) * size_of :: < Option < String > > ( ) ; } let encoded_ids_size = size_of :: < u32 > ( ) * match buffers { true => self . encoded_data . capacity ( ) , false => self . encoded_data . len ( ) , } ; base_size + decoded_keys_size + encoded_ids_size }
A reasonable estimation of the on-heap size this encoding takes up.
A reasonable estimation of the on - heap size this encoding takes up .
&self
buffers
bool
&self
buffers
bool