[−][src]Struct rustracing::span::SpanHandle
Immutable handle of Span
.
Methods
impl<T> SpanHandle<T>
[src]
pub fn is_sampled(&self) -> bool
[src]
Returns true
if this span is sampled (i.e., being traced).
pub fn context(&self) -> Option<&SpanContext<T>>
[src]
Returns the context of this span.
pub fn get_baggage_item(&self, name: &str) -> Option<&BaggageItem>
[src]
Gets the baggage item that has the name name
.
pub fn child<N, F>(&self, operation_name: N, f: F) -> Span<T> where
N: Into<Cow<'static, str>>,
T: Clone,
F: FnOnce(StartSpanOptions<AllSampler, T>) -> Span<T>,
[src]
N: Into<Cow<'static, str>>,
T: Clone,
F: FnOnce(StartSpanOptions<AllSampler, T>) -> Span<T>,
Starts a ChildOf
span if this span is sampled.
pub fn follower<N, F>(&self, operation_name: N, f: F) -> Span<T> where
N: Into<Cow<'static, str>>,
T: Clone,
F: FnOnce(StartSpanOptions<AllSampler, T>) -> Span<T>,
[src]
N: Into<Cow<'static, str>>,
T: Clone,
F: FnOnce(StartSpanOptions<AllSampler, T>) -> Span<T>,
Starts a FollowsFrom
span if this span is sampled.
Trait Implementations
impl<T: Clone> Clone for SpanHandle<T>
[src]
fn clone(&self) -> SpanHandle<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Debug> Debug for SpanHandle<T>
[src]
Auto Trait Implementations
impl<T> Send for SpanHandle<T> where
T: Send,
T: Send,
impl<T> !Sync for SpanHandle<T>
impl<T> Unpin for SpanHandle<T> where
T: Unpin,
T: Unpin,
impl<T> !UnwindSafe for SpanHandle<T>
impl<T> !RefUnwindSafe for SpanHandle<T>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,