[][src]Trait tracers_core::argtypes::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<bool> for bool[src]

type WrapperType = bool

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

type WrapperType = &'a CStr

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

type WrapperType = &'a CString

impl ProbeArgType<usize> for usize[src]

type WrapperType = usize

impl ProbeArgType<isize> for isize[src]

type WrapperType = isize

impl ProbeArgType<u64> for u64[src]

type WrapperType = u64

impl ProbeArgType<i64> for i64[src]

type WrapperType = i64

impl ProbeArgType<u32> for u32[src]

type WrapperType = u32

impl ProbeArgType<i32> for i32[src]

type WrapperType = i32

impl ProbeArgType<u16> for u16[src]

type WrapperType = u16

impl ProbeArgType<i16> for i16[src]

type WrapperType = i16

impl ProbeArgType<u8> for u8[src]

type WrapperType = u8

impl ProbeArgType<i8> for i8[src]

type WrapperType = i8

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

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

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<T> ProbeArgType<*const T> for *const T[src]

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

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

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

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

Loading content...

Implementors

Loading content...