Trait vector_buffers::topology::builder::IntoBuffer

source ·
pub trait IntoBuffer<T: Bufferable>: Send {
    // Required method
    fn into_buffer_parts<'async_trait>(
        self: Box<Self>,
        usage_handle: BufferUsageHandle,
    ) -> Pin<Box<dyn Future<Output = Result<(SenderAdapter<T>, ReceiverAdapter<T>), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
       where Self: 'async_trait;

    // Provided method
    fn provides_instrumentation(&self) -> bool { ... }
}
Expand description

Value that can be used as a stage in a buffer topology.

Required Methods§

source

fn into_buffer_parts<'async_trait>( self: Box<Self>, usage_handle: BufferUsageHandle, ) -> Pin<Box<dyn Future<Output = Result<(SenderAdapter<T>, ReceiverAdapter<T>), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait,

Converts this value into a sender and receiver pair suitable for use in a buffer topology.

Provided Methods§

source

fn provides_instrumentation(&self) -> bool

Gets whether or not this buffer stage provides its own instrumentation, or if it should be instrumented from the outside.

As some buffer stages, like the in-memory channel, never have a chance to catch the values in the middle of the channel without introducing an unnecessary hop, BufferSender and BufferReceiver can be configured to instrument all events flowing through directly.

When instrumentation is provided in this way, vector_common::byte_size_of::ByteSizeOf is used to calculate the size of the event going both into and out of the buffer.

Implementors§