pub struct InRootSpan<F> { /* private fields */ }Expand description
InRootSpan provides similar features like fastrace::future::InSpan with more controls.
Implementations§
Source§impl<F> InRootSpan<F>
impl<F> InRootSpan<F>
Sourcepub fn new(inner: F, root: Span) -> Selfwhere
F: Future,
pub fn new(inner: F, root: Span) -> Selfwhere
F: Future,
Create a traced future with the given root span.
Sourcepub fn with_threshold(self, threshold: Duration) -> Self
pub fn with_threshold(self, threshold: Duration) -> Self
Set record threshold for the root span.
If the duration of the root span is lower than the threshold, the root span will not be recorded.
Trait Implementations§
Source§impl<F> Deref for InRootSpan<F>
impl<F> Deref for InRootSpan<F>
Source§impl<F> Future for InRootSpan<F>where
F: Future,
impl<F> Future for InRootSpan<F>where
F: Future,
impl<'pin, F> Unpin for InRootSpan<F>where
PinnedFieldsOf<__InRootSpan<'pin, F>>: Unpin,
Auto Trait Implementations§
impl<F> Freeze for InRootSpan<F>where
F: Freeze,
impl<F> RefUnwindSafe for InRootSpan<F>where
F: RefUnwindSafe,
impl<F> Send for InRootSpan<F>where
F: Send,
impl<F> Sync for InRootSpan<F>where
F: Sync,
impl<F> UnwindSafe for InRootSpan<F>where
F: UnwindSafe,
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
Source§impl<T> FutureExt for Twhere
T: Future,
impl<T> FutureExt for Twhere
T: Future,
Source§fn enter_on_poll(self, name: impl Into<Cow<'static, str>>) -> EnterOnPoll<Self>
fn enter_on_poll(self, name: impl Into<Cow<'static, str>>) -> EnterOnPoll<Self>
Starts a
LocalSpan at every Future::poll(). If the future gets polled multiple
times, it will create multiple short spans. Read moreSource§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more