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§
impl Copy for Location
impl Eq for Location
Source§impl Ord for Location
impl Ord for Location
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Location
impl PartialOrd for Location
impl StructuralPartialEq for Location
Auto Trait Implementations§
impl Freeze for Location
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin for Location
impl UnsafeUnpin 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