Trait vector::sinks::prelude::ByteSizeOf

source ·
pub trait ByteSizeOf {
    // Required method
    fn allocated_bytes(&self) -> usize;

    // Provided method
    fn size_of(&self) -> usize { ... }
}

Required Methods§

source

fn allocated_bytes(&self) -> usize

Returns the allocated bytes of this type

This function returns the total number of bytes that have been allocated interior to this type instance. It does not include any bytes that are captured by std::mem::size_of except for any bytes that are interior to this type. For instance, BTreeMap<String, Vec<u8>> would count all bytes for String and Vec<u8> instances but not the exterior bytes for BTreeMap.

Provided Methods§

source

fn size_of(&self) -> usize

Returns the in-memory size of this type

This function returns the total number of bytes that std::mem::size_of does in addition to any interior allocated bytes. Its default implementation is std::mem::size_of + ByteSizeOf::allocated_bytes.

Implementations on Foreign Types§

source§

impl ByteSizeOf for Value

source§

impl ByteSizeOf for f32

source§

impl ByteSizeOf for f64

source§

impl ByteSizeOf for i8

source§

impl ByteSizeOf for i16

source§

impl ByteSizeOf for i32

source§

impl ByteSizeOf for i64

source§

impl ByteSizeOf for i128

source§

impl ByteSizeOf for u8

source§

impl ByteSizeOf for u16

source§

impl ByteSizeOf for u32

source§

impl ByteSizeOf for u64

source§

impl ByteSizeOf for u128

source§

impl ByteSizeOf for Box<RawValue>

source§

impl ByteSizeOf for String

source§

impl ByteSizeOf for DateTime<Utc>

source§

impl ByteSizeOf for Bytes

source§

impl ByteSizeOf for BytesMut

source§

impl<'a> ByteSizeOf for &'a str

source§

impl<'a, T> ByteSizeOf for &'a T
where T: ByteSizeOf,

source§

impl<A> ByteSizeOf for SmallVec<A>
where A: Array, <A as Array>::Item: ByteSizeOf,

source§

impl<K, V> ByteSizeOf for BTreeMap<K, V>
where K: ByteSizeOf, V: ByteSizeOf,

source§

impl<K, V> ByteSizeOf for IndexMap<K, V>
where K: ByteSizeOf, V: ByteSizeOf,

source§

impl<T> ByteSizeOf for &[T]
where T: ByteSizeOf,

source§

impl<T> ByteSizeOf for Option<T>
where T: ByteSizeOf,

source§

impl<T> ByteSizeOf for BTreeSet<T>
where T: ByteSizeOf,

source§

impl<T> ByteSizeOf for Vec<T>
where T: ByteSizeOf,

source§

impl<T> ByteSizeOf for IndexSet<T>
where T: ByteSizeOf,

source§

impl<T, const N: usize> ByteSizeOf for [T; N]
where T: ByteSizeOf,

Implementors§

source§

impl ByteSizeOf for Event

source§

impl ByteSizeOf for EventArray

source§

impl ByteSizeOf for MetricValue

source§

impl ByteSizeOf for vector::event::Value

source§

impl ByteSizeOf for MetricSketch

source§

impl ByteSizeOf for TagValue

source§

impl ByteSizeOf for TagValueSet

source§

impl ByteSizeOf for Bucket

source§

impl ByteSizeOf for MetricData

source§

impl ByteSizeOf for MetricName

source§

impl ByteSizeOf for MetricSeries

source§

impl ByteSizeOf for Quantile

source§

impl ByteSizeOf for Sample

source§

impl ByteSizeOf for EventFinalizer

source§

impl ByteSizeOf for EventFinalizers

source§

impl ByteSizeOf for EventMetadata

source§

impl ByteSizeOf for KeyString

source§

impl ByteSizeOf for LogEvent

source§

impl ByteSizeOf for Metric

source§

impl ByteSizeOf for MetricTags

source§

impl ByteSizeOf for TraceEvent

source§

impl ByteSizeOf for AgentDDSketch

source§

impl ByteSizeOf for SourceSenderItem

source§

impl ByteSizeOf for OutputBuffer

source§

impl ByteSizeOf for TransformOutputsBuf

source§

impl ByteSizeOf for DatadogEventsRequest

source§

impl ByteSizeOf for vector::sinks::elasticsearch::encoder::ProcessedEvent

source§

impl ByteSizeOf for ElasticsearchRequest

source§

impl ByteSizeOf for HecRequest

source§

impl<E, M> ByteSizeOf for vector::sinks::util::processed_event::ProcessedEvent<E, M>
where E: ByteSizeOf, M: ByteSizeOf,

source§

impl<R> ByteSizeOf for KinesisRequest<R>
where R: Record,

source§

impl<T: Send> ByteSizeOf for HttpRequest<T>

source§

impl<T: ByteSizeOf, K> ByteSizeOf for PartitionInnerBuffer<T, K>