Struct rustracing::span::StartSpanOptions
source · [−]pub struct StartSpanOptions<'a, S: 'a, T: 'a> { /* private fields */ }
Expand description
Options for starting a span.
Implementations
sourceimpl<'a, S: 'a, T: 'a> StartSpanOptions<'a, S, T> where
S: Sampler<T>,
impl<'a, S: 'a, T: 'a> StartSpanOptions<'a, S, T> where
S: Sampler<T>,
sourcepub fn start_time(self, time: SystemTime) -> Self
pub fn start_time(self, time: SystemTime) -> Self
Sets the start time of this span.
sourcepub fn child_of<C>(self, context: &C) -> Self where
C: MaybeAsRef<SpanContext<T>>,
T: Clone,
pub fn child_of<C>(self, context: &C) -> Self where
C: MaybeAsRef<SpanContext<T>>,
T: Clone,
Adds the ChildOf
reference to this span.
sourcepub fn follows_from<C>(self, context: &C) -> Self where
C: MaybeAsRef<SpanContext<T>>,
T: Clone,
pub fn follows_from<C>(self, context: &C) -> Self where
C: MaybeAsRef<SpanContext<T>>,
T: Clone,
Adds the FollowsFrom
reference to this span.
sourcepub fn start(self) -> Span<T> where
T: for<'b> From<CandidateSpan<'b, T>>,
pub fn start(self) -> Span<T> where
T: for<'b> From<CandidateSpan<'b, T>>,
Starts a new span.
sourcepub fn start_with_state(self, state: T) -> Span<T>
pub fn start_with_state(self, state: T) -> Span<T>
Starts a new span with the explicit state
.
Trait Implementations
Auto Trait Implementations
impl<'a, S, T> RefUnwindSafe for StartSpanOptions<'a, S, T> where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, S, T> Send for StartSpanOptions<'a, S, T> where
S: Sync,
T: Send,
impl<'a, S, T> Sync for StartSpanOptions<'a, S, T> where
S: Sync,
T: Send + Sync,
impl<'a, S, T> Unpin for StartSpanOptions<'a, S, T> where
T: Unpin,
impl<'a, S, T> UnwindSafe for StartSpanOptions<'a, S, T> where
S: RefUnwindSafe,
T: 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