File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -449,6 +449,14 @@ where
449449}
450450
451451impl < T > Instrumented < T > {
452+ /// Get both a mutable reference to the `Span` that this type is
453+ /// instrumented by and a pinned mutable reference to the inner value.
454+ ///
455+ /// This is useful for implementing poll-type functions on foreign traits.
456+ pub fn span_and_inner_pin_mut ( self : Pin < & mut Self > ) -> ( & mut Span , Pin < & mut T > ) {
457+ self . project ( ) . span_and_inner_pin_mut ( )
458+ }
459+
452460 /// Borrows the `Span` that this type is instrumented by.
453461 pub fn span ( & self ) -> & Span {
454462 & self . span
Original file line number Diff line number Diff line change @@ -325,6 +325,14 @@ impl<T: Future> Future for Instrumented<T> {
325325impl < T : Sized > Instrument for T { }
326326
327327impl < T > Instrumented < T > {
328+ /// Get both a mutable reference to the `Span` that this type is
329+ /// instrumented by and a pinned mutable reference to the inner value.
330+ ///
331+ /// This is useful for implementing poll-type functions on foreign traits.
332+ pub fn span_and_inner_pin_mut ( self : Pin < & mut Self > ) -> ( & mut Span , Pin < & mut T > ) {
333+ self . project ( ) . span_and_inner_pin_mut ( )
334+ }
335+
328336 /// Borrows the `Span` that this type is instrumented by.
329337 pub fn span ( & self ) -> & Span {
330338 & self . span
You can’t perform that action at this time.
0 commit comments