pub trait MeteredBytes {
// Required method
fn metered_bytes(&self) -> u64;
}👎Deprecated since 0.21.1: This crate has been renamed to
s2-sdk. Please update your Cargo.toml to use s2-sdk instead.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
👎Deprecated since 0.21.1: This crate has been renamed to s2-sdk. Please update your Cargo.toml to use s2-sdk instead.
fn metered_bytes(&self) -> u64
s2-sdk. Please update your Cargo.toml to use s2-sdk instead.Return the metered bytes of the object.
Implementations on Foreign Types§
Source§impl<T: MeteredBytes> MeteredBytes for Vec<T>
impl<T: MeteredBytes> MeteredBytes for Vec<T>
Source§fn metered_bytes(&self) -> u64
fn metered_bytes(&self) -> u64
👎Deprecated since 0.21.1: This crate has been renamed to
s2-sdk. Please update your Cargo.toml to use s2-sdk instead.