/// Estimate the memory consumption of this object and its contents
Estimate the memory consumption of this object and its contents
Estimate the memory consumption of this object and its contents
pub fn size(&self) -> usize {
        // size of this structure, including inlined size + heap sizes
        let size_without_sortkey_refs = mem::size_of_val(self)
            + self.namespace_name.as_bytes().len()
            + self.table_name.as_bytes().len()
            + self.partition_key.as_bytes().len();
        if let Some(sort_key) = self.sort_key.as_ref() {
            size_without_sortkey_refs +
                sort_key.size()
            // already included in `size_of_val(self)` above so remove to avoid double counting
                - mem::size_of_val(sort_key)
        } else {
            size_without_sortkey_refs
        }
    }
pub fn size ( & self ) -> usize { // size of this structure, including inlined size + heap sizes let size_without_sortkey_refs = mem :: size_of_val ( self ) + self . namespace_name . as_bytes ( ) . len ( ) + self . table_name . as_bytes ( ) . len ( ) + self . partition_key . as_bytes ( ) . len ( ) ; if let Some ( sort_key ) = self . sort_key . as_ref ( ) { size_without_sortkey_refs + sort_key . size ( ) // already included in `size_of_val(self)` above so remove to avoid double counting - mem :: size_of_val ( sort_key ) } else { size_without_sortkey_refs } }
Estimate the memory consumption of this object and its contents
Estimate the memory consumption of this object and its contents
&self