NominalDatasetStream#

pub struct NominalDatasetStream#

Implementations#

impl NominalDatasetStream
pub fn builder() -> NominalDatasetStreamBuilder#
pub fn new_with_consumer<C: WriteRequestConsumer + 'static>(consumer: C, opts: NominalStreamOpts) -> Self#

Panics

Panics if opts.max_points_per_record or opts.request_dispatcher_tasks is zero.

pub fn double_writer(&self, channel_descriptor: ChannelDescriptor) -> NominalDoubleWriter<'_>#
pub fn string_writer(&self, channel_descriptor: ChannelDescriptor) -> NominalStringWriter<'_>#
pub fn integer_writer(&self, channel_descriptor: ChannelDescriptor) -> NominalIntegerWriter<'_>#
pub fn uint64_writer(&self, channel_descriptor: ChannelDescriptor) -> NominalUint64Writer<'_>#
pub fn struct_writer(&self, channel_descriptor: ChannelDescriptor) -> NominalStructWriter<'_>#
pub fn double_array_writer(&self, channel_descriptor: ChannelDescriptor) -> NominalDoubleArrayWriter<'_>#
pub fn string_array_writer(&self, channel_descriptor: ChannelDescriptor) -> NominalStringArrayWriter<'_>#
pub fn enqueue(&self, channel_descriptor: &ChannelDescriptor, new_points: impl IntoPoints)#
pub fn enqueue_many(&self, entries: Vec<(ChannelDescriptor, PointsType)>)#

Enqueues points for many channels, blocking while both buffers are full.

This reserves capacity and takes the buffer lock once per batch, where the equivalent run of enqueue calls would do both once per channel. For a wide record – thousands of channels sharing a timestamp – that is the difference between one buffer insertion and thousands of them.

A batch larger than max_points_per_record is admitted in groups of channel entries. An individual oversized entry is admitted whole; the background processor splits output requests to the configured limit. Fitting buffered records are sent unchanged. Concurrent producers can overfill a buffer, in which case even a fitting batch may span requests.

Trait implementations#

impl Drop for NominalDatasetStream
fn drop(&mut self)

Auto traits: Send, Sync, Unpin, !UnwindSafe, !RefUnwindSafe