pub struct SampleDatum {
pub selector: Option<SelectorArgument>,
pub strategy: Option<SampleStrategy>,
pub interval_secs: Option<i64>,
/* private fields */
}
Fields§
§selector: Option<SelectorArgument>
The selector to check.
strategy: Option<SampleStrategy>
The strategy by which the server decides to notify the client.
interval_secs: Option<i64>
The interval at which this datum should be sampled.
Each SampleDatum
has its own specified interval. It is preferred to send
as many selectors on one Sample
connection as possible, to allow
Archivist to batch requests. However, Archivist will query at a period that
is the greatest common divisor of all intervals. So, balance the desire for
a small number of Sample
connections with keeping the intervals compatible.
Example: two data with intervals of 3 and 4 respectively would check for work every second. Archivist won’t actually sample if neither batch is ready, but it will check.
Example: two data with intervals of 10 and 5 respectively would only check for work every 5 seconds.
(In practice, the calculated sample period must be valid. See MINIMUM_SAMPLE_PERIOD_SECONDS above.)
Trait Implementations§
Source§impl Clone for SampleDatum
impl Clone for SampleDatum
Source§fn clone(&self) -> SampleDatum
fn clone(&self) -> SampleDatum
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SampleDatum
impl Debug for SampleDatum
Source§impl<D> Decode<SampleDatum, D> for SampleDatumwhere
D: ResourceDialect,
impl<D> Decode<SampleDatum, D> for SampleDatumwhere
D: ResourceDialect,
Source§fn new_empty() -> SampleDatum
fn new_empty() -> SampleDatum
Self
. The specific value does not matter,
since it will be overwritten by decode
.Source§impl Default for SampleDatum
impl Default for SampleDatum
Source§fn default() -> SampleDatum
fn default() -> SampleDatum
Source§impl<D> Encode<SampleDatum, D> for &SampleDatumwhere
D: ResourceDialect,
impl<D> Encode<SampleDatum, D> for &SampleDatumwhere
D: ResourceDialect,
Source§impl PartialEq for SampleDatum
impl PartialEq for SampleDatum
Source§impl TypeMarker for SampleDatum
impl TypeMarker for SampleDatum
Source§type Owned = SampleDatum
type Owned = SampleDatum
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.Source§impl ValueTypeMarker for SampleDatum
impl ValueTypeMarker for SampleDatum
Source§type Borrowed<'a> = &'a SampleDatum
type Borrowed<'a> = &'a SampleDatum
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreSource§fn borrow(
value: &<SampleDatum as TypeMarker>::Owned,
) -> <SampleDatum as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<SampleDatum as TypeMarker>::Owned, ) -> <SampleDatum as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.