pub enum SamplingRate {
Variant0(SamplingRateVariant0),
Variant1(i64),
}Expand description
Represents the sampling rate for collecting latency metrics. May be ‘headers’ or an integer between 1 and 100.
JSON schema
{
"description": "Represents the sampling rate for collecting latency metrics. May be 'headers' or an integer between 1 and 100.",
"oneOf": [
{
"description": "Indicates headers-based sampling ('headers'). If set to 'headers', the NATS server uses request headers for sampling decisions.",
"type": "string",
"enum": [
"headers"
]
},
{
"type": "integer",
"maximum": 100.0,
"minimum": 1.0
}
]
}Variants§
Variant0(SamplingRateVariant0)
Variant1(i64)
Trait Implementations§
Source§impl Clone for SamplingRate
impl Clone for SamplingRate
Source§fn clone(&self) -> SamplingRate
fn clone(&self) -> SamplingRate
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 moreSource§impl Debug for SamplingRate
impl Debug for SamplingRate
Source§impl<'de> Deserialize<'de> for SamplingRate
impl<'de> Deserialize<'de> for SamplingRate
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&SamplingRate> for SamplingRate
impl From<&SamplingRate> for SamplingRate
Source§fn from(value: &SamplingRate) -> Self
fn from(value: &SamplingRate) -> Self
Converts to this type from the input type.
Source§impl From<SamplingRateVariant0> for SamplingRate
impl From<SamplingRateVariant0> for SamplingRate
Source§fn from(value: SamplingRateVariant0) -> Self
fn from(value: SamplingRateVariant0) -> Self
Converts to this type from the input type.
Source§impl From<i64> for SamplingRate
impl From<i64> for SamplingRate
Auto Trait Implementations§
impl Freeze for SamplingRate
impl RefUnwindSafe for SamplingRate
impl Send for SamplingRate
impl Sync for SamplingRate
impl Unpin for SamplingRate
impl UnwindSafe for SamplingRate
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