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<Location> for Location
impl PartialEq<Location> for Location
source§impl PartialOrd<Location> for Location
impl PartialOrd<Location> 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 more