Struct relay_sampling::evaluation::SamplingMatch
source · pub struct SamplingMatch { /* private fields */ }
Expand description
Represents the specification for sampling an incoming event.
Implementations§
source§impl SamplingMatch
impl SamplingMatch
sourcepub fn sample_rate(&self) -> f64
pub fn sample_rate(&self) -> f64
Returns the sample rate.
sourcepub fn into_matched_rules(self) -> MatchedRuleIds
pub fn into_matched_rules(self) -> MatchedRuleIds
Returns the matched rules for the sampling match.
Takes ownership, useful if you don’t need the SamplingMatch
anymore
and you want to avoid allocations.
sourcepub fn should_keep(&self) -> bool
pub fn should_keep(&self) -> bool
Returns true if event should be kept.
sourcepub fn should_drop(&self) -> bool
pub fn should_drop(&self) -> bool
Returns true if event should be dropped.
Trait Implementations§
source§impl Clone for SamplingMatch
impl Clone for SamplingMatch
source§fn clone(&self) -> SamplingMatch
fn clone(&self) -> SamplingMatch
Returns a copy 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 moresource§impl Debug for SamplingMatch
impl Debug for SamplingMatch
source§impl PartialEq for SamplingMatch
impl PartialEq for SamplingMatch
source§fn eq(&self, other: &SamplingMatch) -> bool
fn eq(&self, other: &SamplingMatch) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for SamplingMatch
Auto Trait Implementations§
impl Freeze for SamplingMatch
impl RefUnwindSafe for SamplingMatch
impl Send for SamplingMatch
impl Sync for SamplingMatch
impl Unpin for SamplingMatch
impl UnwindSafe for SamplingMatch
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