pub struct SampleDataRecord<F, S = (), M = Unset>where
M: Optional,{ /* private fields */ }Expand description
Builds a Reactor that samples a data record with a TimeMatrix.
See the event::sample_data_record function.
Implementations§
Source§impl<F, S> SampleDataRecord<F, S, Set<Metadata<F>>>where
F: Statistic,
impl<F, S> SampleDataRecord<F, S, Set<Metadata<F>>>where
F: Statistic,
pub fn in_time_matrix<P>(
self,
client: &TimeMatrixClient,
name: impl AsRef<str>,
profile: SamplingProfile,
interpolation: P::Output<F::Sample>,
) -> impl Reactor<F::Sample, S, Response = (), Error = FoldError>where
TimeMatrix<F, P>: 'static + TimeMatrixFold<F::Sample> + Send,
Metadata<F>: 'static + Send + Sync,
F: SerialStatistic<P>,
F::Sample: Send,
P: InterpolationKind,
Source§impl<F, S> SampleDataRecord<F, S, Unset>where
F: Statistic,
impl<F, S> SampleDataRecord<F, S, Unset>where
F: Statistic,
Sourcepub fn with_metadata(
self,
metadata: impl Into<Metadata<F>>,
) -> SampleDataRecord<F, S, Set<Metadata<F>>>
pub fn with_metadata( self, metadata: impl Into<Metadata<F>>, ) -> SampleDataRecord<F, S, Set<Metadata<F>>>
Builds the Reactor with the given metadata for the TimeMatrix.
The type of metadata is determined by the DataSemantic of the Statistic. For
example, the Union statistic has BitSet semantics and so requires types convertible
into the BitSetIndex metadata type.
pub fn in_time_matrix<P>(
self,
client: &TimeMatrixClient,
name: impl AsRef<str>,
profile: SamplingProfile,
interpolation: P::Output<F::Sample>,
) -> impl Reactor<F::Sample, S, Response = (), Error = FoldError>where
TimeMatrix<F, P>: 'static + TimeMatrixFold<F::Sample> + Send,
Metadata<F>: 'static + Send + Sync,
F: SerialStatistic<P>,
F::Sample: Send,
P: InterpolationKind,
Trait Implementations§
Source§impl<F: Clone, S: Clone, M> Clone for SampleDataRecord<F, S, M>
impl<F: Clone, S: Clone, M> Clone for SampleDataRecord<F, S, M>
Source§fn clone(&self) -> SampleDataRecord<F, S, M>
fn clone(&self) -> SampleDataRecord<F, S, M>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<F: Copy, S: Copy, M> Copy for SampleDataRecord<F, S, M>
Auto Trait Implementations§
impl<F, S, M> Freeze for SampleDataRecord<F, S, M>
impl<F, S, M> RefUnwindSafe for SampleDataRecord<F, S, M>where
F: RefUnwindSafe,
<M as Optional>::Field: RefUnwindSafe,
impl<F, S, M> Send for SampleDataRecord<F, S, M>
impl<F, S, M> Sync for SampleDataRecord<F, S, M>
impl<F, S, M> Unpin for SampleDataRecord<F, S, M>
impl<F, S, M> UnwindSafe for SampleDataRecord<F, S, M>where
F: UnwindSafe,
<M as Optional>::Field: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more