pub trait MeteredBytes {
// Required method
fn metered_bytes(&self) -> u64;
}
Expand description
Metered size of the object in bytes.
Bytes are calculated using the “metered bytes” formula:
metered_bytes = lambda record: 8 + 2 * len(record.headers) + sum((len(h.key) + len(h.value)) for h in record.headers) + len(record.body)
Required Methods§
Sourcefn metered_bytes(&self) -> u64
fn metered_bytes(&self) -> u64
Return the metered bytes of the object.