[−][src]Struct holochain_tracing::SpanWrap
SpanWrap is a simple way to couple some data along with a struct It is common to send some data on a channel which will be used as arguments to a function on the receiving side, where we also want to continue the trace on the receiving side. This struct helps keep that data together with minimal boilerplate.
The use of shrinkwrap allows the entire struct to be used as if it were a bare T (in most situations), but the RtSpan can also be extracted.
Fields
data: T
span: HSpan
Methods
impl<T> SpanWrap<T>
[src]
pub fn map<__SHRINKWRAP_T, __SHRINKWRAP_F: FnMut(T) -> __SHRINKWRAP_T>(
self,
f: __SHRINKWRAP_F
) -> __SHRINKWRAP_T
[src]
self,
f: __SHRINKWRAP_F
) -> __SHRINKWRAP_T
Map a function over the wrapped value, consuming it in the process.
pub fn map_ref<__SHRINKWRAP_T, __SHRINKWRAP_F: FnMut(&T) -> __SHRINKWRAP_T>(
&self,
f: __SHRINKWRAP_F
) -> __SHRINKWRAP_T
[src]
&self,
f: __SHRINKWRAP_F
) -> __SHRINKWRAP_T
Map a function over the wrapped value without consuming it.
pub fn map_mut<__SHRINKWRAP_T, __SHRINKWRAP_F>(
&mut self,
f: __SHRINKWRAP_F
) -> __SHRINKWRAP_T where
__SHRINKWRAP_F: FnMut(&mut T) -> __SHRINKWRAP_T,
[src]
&mut self,
f: __SHRINKWRAP_F
) -> __SHRINKWRAP_T where
__SHRINKWRAP_F: FnMut(&mut T) -> __SHRINKWRAP_T,
Map a function over the wrapped value, potentially changing it in place.
impl<T> SpanWrap<T>
[src]
Trait Implementations
impl<T> AsRef<T> for SpanWrap<T>
[src]
impl<T> AsMut<T> for SpanWrap<T>
[src]
impl<T> Deref for SpanWrap<T>
[src]
impl<T> DerefMut for SpanWrap<T>
[src]
impl<T> Borrow<T> for SpanWrap<T>
[src]
impl<T> BorrowMut<T> for SpanWrap<T>
[src]
fn borrow_mut(&mut self) -> &mut T
[src]
Auto Trait Implementations
impl<T> Send for SpanWrap<T> where
T: Send,
T: Send,
impl<T> Sync for SpanWrap<T> where
T: Sync,
T: Sync,
impl<T> Unpin for SpanWrap<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for SpanWrap<T> where
T: UnwindSafe,
T: UnwindSafe,
impl<T> RefUnwindSafe for SpanWrap<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,