#[non_exhaustive]pub struct SamplingStatisticsDocumentBuilder { /* private fields */ }
Expand description
A builder for SamplingStatisticsDocument
.
Implementations§
source§impl SamplingStatisticsDocumentBuilder
impl SamplingStatisticsDocumentBuilder
sourcepub fn rule_name(self, input: impl Into<String>) -> Self
pub fn rule_name(self, input: impl Into<String>) -> Self
The name of the sampling rule.
This field is required.sourcepub fn set_rule_name(self, input: Option<String>) -> Self
pub fn set_rule_name(self, input: Option<String>) -> Self
The name of the sampling rule.
sourcepub fn get_rule_name(&self) -> &Option<String>
pub fn get_rule_name(&self) -> &Option<String>
The name of the sampling rule.
sourcepub fn client_id(self, input: impl Into<String>) -> Self
pub fn client_id(self, input: impl Into<String>) -> Self
A unique identifier for the service in hexadecimal.
This field is required.sourcepub fn set_client_id(self, input: Option<String>) -> Self
pub fn set_client_id(self, input: Option<String>) -> Self
A unique identifier for the service in hexadecimal.
sourcepub fn get_client_id(&self) -> &Option<String>
pub fn get_client_id(&self) -> &Option<String>
A unique identifier for the service in hexadecimal.
sourcepub fn set_timestamp(self, input: Option<DateTime>) -> Self
pub fn set_timestamp(self, input: Option<DateTime>) -> Self
The current time.
sourcepub fn get_timestamp(&self) -> &Option<DateTime>
pub fn get_timestamp(&self) -> &Option<DateTime>
The current time.
sourcepub fn request_count(self, input: i32) -> Self
pub fn request_count(self, input: i32) -> Self
The number of requests that matched the rule.
This field is required.sourcepub fn set_request_count(self, input: Option<i32>) -> Self
pub fn set_request_count(self, input: Option<i32>) -> Self
The number of requests that matched the rule.
sourcepub fn get_request_count(&self) -> &Option<i32>
pub fn get_request_count(&self) -> &Option<i32>
The number of requests that matched the rule.
sourcepub fn sampled_count(self, input: i32) -> Self
pub fn sampled_count(self, input: i32) -> Self
The number of requests recorded.
This field is required.sourcepub fn set_sampled_count(self, input: Option<i32>) -> Self
pub fn set_sampled_count(self, input: Option<i32>) -> Self
The number of requests recorded.
sourcepub fn get_sampled_count(&self) -> &Option<i32>
pub fn get_sampled_count(&self) -> &Option<i32>
The number of requests recorded.
sourcepub fn borrow_count(self, input: i32) -> Self
pub fn borrow_count(self, input: i32) -> Self
The number of requests recorded with borrowed reservoir quota.
sourcepub fn set_borrow_count(self, input: Option<i32>) -> Self
pub fn set_borrow_count(self, input: Option<i32>) -> Self
The number of requests recorded with borrowed reservoir quota.
sourcepub fn get_borrow_count(&self) -> &Option<i32>
pub fn get_borrow_count(&self) -> &Option<i32>
The number of requests recorded with borrowed reservoir quota.
sourcepub fn build(self) -> Result<SamplingStatisticsDocument, BuildError>
pub fn build(self) -> Result<SamplingStatisticsDocument, BuildError>
Consumes the builder and constructs a SamplingStatisticsDocument
.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for SamplingStatisticsDocumentBuilder
impl Clone for SamplingStatisticsDocumentBuilder
source§fn clone(&self) -> SamplingStatisticsDocumentBuilder
fn clone(&self) -> SamplingStatisticsDocumentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for SamplingStatisticsDocumentBuilder
impl Default for SamplingStatisticsDocumentBuilder
source§fn default() -> SamplingStatisticsDocumentBuilder
fn default() -> SamplingStatisticsDocumentBuilder
source§impl PartialEq for SamplingStatisticsDocumentBuilder
impl PartialEq for SamplingStatisticsDocumentBuilder
source§fn eq(&self, other: &SamplingStatisticsDocumentBuilder) -> bool
fn eq(&self, other: &SamplingStatisticsDocumentBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for SamplingStatisticsDocumentBuilder
Auto Trait Implementations§
impl Freeze for SamplingStatisticsDocumentBuilder
impl RefUnwindSafe for SamplingStatisticsDocumentBuilder
impl Send for SamplingStatisticsDocumentBuilder
impl Sync for SamplingStatisticsDocumentBuilder
impl Unpin for SamplingStatisticsDocumentBuilder
impl UnwindSafe for SamplingStatisticsDocumentBuilder
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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