pub enum SamplingDecision {
RecordAndSample,
NotRecord,
}Expand description
采样决策
Variants§
Implementations§
Source§impl SamplingDecision
impl SamplingDecision
Sourcepub fn is_sampled(&self) -> bool
pub fn is_sampled(&self) -> bool
是否采样
Sourcepub fn as_trace_flags(&self) -> &'static str
pub fn as_trace_flags(&self) -> &'static str
转为 W3C traceparent 中的 trace_flags(01 表示采样,00 表示不采样)
Trait Implementations§
Source§impl Clone for SamplingDecision
impl Clone for SamplingDecision
Source§fn clone(&self) -> SamplingDecision
fn clone(&self) -> SamplingDecision
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SamplingDecision
Source§impl Debug for SamplingDecision
impl Debug for SamplingDecision
impl Eq for SamplingDecision
Source§impl PartialEq for SamplingDecision
impl PartialEq for SamplingDecision
impl StructuralPartialEq for SamplingDecision
Auto Trait Implementations§
impl Freeze for SamplingDecision
impl RefUnwindSafe for SamplingDecision
impl Send for SamplingDecision
impl Sync for SamplingDecision
impl Unpin for SamplingDecision
impl UnsafeUnpin for SamplingDecision
impl UnwindSafe for SamplingDecision
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