Struct rustracing::sampler::OrSampler
source · [−]pub struct OrSampler<A, B>(_, _);
Expand description
or
combinator.
Trait Implementations
sourceimpl<A, B, T> Sampler<T> for OrSampler<A, B> where
A: Sampler<T>,
B: Sampler<T>,
impl<A, B, T> Sampler<T> for OrSampler<A, B> where
A: Sampler<T>,
B: Sampler<T>,
sourcefn is_sampled(&self, span: &CandidateSpan<'_, T>) -> bool
fn is_sampled(&self, span: &CandidateSpan<'_, T>) -> bool
This method decides whether a trace with given span
should be sampled.
sourcefn or<U>(self, other: U) -> OrSampler<Self, U> where
Self: Sized,
U: Sampler<T>,
fn or<U>(self, other: U) -> OrSampler<Self, U> where
Self: Sized,
U: Sampler<T>,
Returns the sampler that samples a trace if self
or other
decides to sample it.
sourcefn and<U>(self, other: U) -> AndSampler<Self, U> where
Self: Sized,
U: Sampler<T>,
fn and<U>(self, other: U) -> AndSampler<Self, U> where
Self: Sized,
U: Sampler<T>,
Returns the sampler that samples a trace if both of self
and other
decides to sample it.
Auto Trait Implementations
impl<A, B> RefUnwindSafe for OrSampler<A, B> where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for OrSampler<A, B> where
A: Send,
B: Send,
impl<A, B> Sync for OrSampler<A, B> where
A: Sync,
B: Sync,
impl<A, B> Unpin for OrSampler<A, B> where
A: Unpin,
B: Unpin,
impl<A, B> UnwindSafe for OrSampler<A, B> where
A: UnwindSafe,
B: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more