Struct rustracing::sampler::AndSampler
source · [−]pub struct AndSampler<A, B>(_, _);
Expand description
and
combinator.
Trait Implementations
sourceimpl<A: Clone, B: Clone> Clone for AndSampler<A, B>
impl<A: Clone, B: Clone> Clone for AndSampler<A, B>
sourcefn clone(&self) -> AndSampler<A, B>
fn clone(&self) -> AndSampler<A, B>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<A: Debug, B: Debug> Debug for AndSampler<A, B>
impl<A: Debug, B: Debug> Debug for AndSampler<A, B>
sourceimpl<A, B, T> Sampler<T> for AndSampler<A, B> where
A: Sampler<T>,
B: Sampler<T>,
impl<A, B, T> Sampler<T> for AndSampler<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 AndSampler<A, B> where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for AndSampler<A, B> where
A: Send,
B: Send,
impl<A, B> Sync for AndSampler<A, B> where
A: Sync,
B: Sync,
impl<A, B> Unpin for AndSampler<A, B> where
A: Unpin,
B: Unpin,
impl<A, B> UnwindSafe for AndSampler<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