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 PartialOrd for Location
impl PartialOrd for Location
impl Copy for Location
impl Eq 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 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