attributes_size

Function attributes_size 

Source
pub fn attributes_size(attributes: &Attributes) -> usize
Expand description

Calculates the canonical size of Attributes.

Simple data types have a fixed size assigned to them:

  • Boolean: 1 byte
  • Integer: 8 byte
  • Double: 8 Byte
  • Strings are counted by their byte (UTF-8 encoded) representation.

Complex types like objects and arrays are counted as the sum of all contained simple data types.

The size of all attributes is the sum of all attribute values and their keys.