[][src]Trait tracers::runtime::ProbeArgType

pub trait ProbeArgType<T> {
    type WrapperType: ProbeArgWrapper;
    fn wrap(arg: T) -> Self::WrapperType;
}

This trait is defined on any type which is supported as an argument to a probe.

In general only scalar integer types are supported directly, though pointers can be passed as u64 values and the tracing code is then responsible for knowing what to do with the pointer (for example, treat it as a null-terminated UTF-8 string, or a pointer to a certain structure, etc).

Associated Types

Loading content...

Required methods

fn wrap(arg: T) -> Self::WrapperType

Loading content...

Implementations on Foreign Types

impl ProbeArgType<i64> for i64[src]

impl ProbeArgType<u16> for u16[src]

impl<'a, T> ProbeArgType<&'a T> for &'a T where
    T: ProbeArgType<T> + Copy
[src]

impl ProbeArgType<i8> for i8[src]

impl<T> ProbeArgType<*const T> for *const T[src]

impl ProbeArgType<u32> for u32[src]

impl<'_, '_> ProbeArgType<&'_ Option<String>> for &'_ Option<String>[src]

The general implementation for Option<T> won't work for Option<String> because we don't support the String type, only references like &String or &str. But an Option<String> is quite often used and it should be supported, so we'll implement it directly here.

The result is the same as the outcome of the conversion in the string module.

impl<'_, '_> ProbeArgType<&'_ str> for &'_ str[src]

impl<'_, '_> ProbeArgType<&'_ OsStr> for &'_ OsStr[src]

impl ProbeArgType<usize> for usize[src]

impl ProbeArgType<u8> for u8[src]

impl<'_, '_> ProbeArgType<&'_ OsString> for &'_ OsString[src]

impl<'a> ProbeArgType<&'a CString> for &'a CString[src]

type WrapperType = &'a CString

impl ProbeArgType<i16> for i16[src]

impl<'a> ProbeArgType<&'a CStr> for &'a CStr[src]

type WrapperType = &'a CStr

impl ProbeArgType<i32> for i32[src]

impl ProbeArgType<u64> for u64[src]

impl ProbeArgType<bool> for bool[src]

impl ProbeArgType<isize> for isize[src]

impl<'_, '_, T> ProbeArgType<&'_ Option<T>> for &'_ Option<T> where
    T: ProbeArgType<T> + Copy
[src]

type WrapperType = Option<<T as ProbeArgType<T>>::WrapperType>

impl<'_, '_> ProbeArgType<&'_ String> for &'_ String[src]

Loading content...

Implementors

Loading content...