Struct async_backtrace::Location
source · pub struct Location { /* private fields */ }
Expand description
A source code location in a function body.
To construct a Location
, use location!()
.
Implementations§
source§impl Location
impl Location
sourcepub fn frame<F>(self, f: F) -> impl Future<Output = F::Output>where
F: Future,
pub fn frame<F>(self, f: F) -> impl Future<Output = F::Output>where
F: Future,
Include the given future in taskdumps with this location.
§Examples
async fn foo() {
async_backtrace::location!().frame(async move {
bar().await;
baz().await;
}).await
}
Trait Implementations§
source§impl Ord for Location
impl Ord for Location
source§impl PartialEq for Location
impl PartialEq for Location
source§impl PartialOrd for Location
impl PartialOrd for Location
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Location
impl Eq for Location
impl StructuralPartialEq for Location
Auto Trait Implementations§
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin for Location
impl UnwindSafe for Location
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more