pub fn from_ident_type_pair(
        probe_method: &syn::TraitItemMethod,
        ordinal: usize,
        ident: &syn::PatIdent,
        typ: &syn::Type,
    ) -> TracersResult<ProbeArgSpecification> {
        //Note the type is annotated right here with the added lifetime information.  It's easier
        //and faster then to compute the annotations on the fly
        if let Some(arg_type_info) = argtypes::from_syn_type(typ) {
            let name = ident.ident.to_string();
            let probe_name = probe_method.sig.ident.to_string();
            let syn_typ = typ.clone();
            let syn_typ_with_lifetimes = Self::add_lifetimes_to_syn_type(&probe_name, &name, typ)?;
            Ok(ProbeArgSpecification {
                name,
                probe_name,
                ordinal,
                ident: ident.clone(),
                syn_typ,
                syn_typ_with_lifetimes,
                arg_type_info,
            })
        } else {
            Err(TracersError::invalid_provider(
                    format!("The argument type '{}' of argument '{}' on probe '{}' is not supported for probing.  Generally only the standard string, integer, and bool types, as well as references and Option's of the same, are supported", syn_helpers::convert_to_string(typ), ident.ident, probe_method.sig.ident), typ,
            ))
        }
    }
/// Constructs a `ProbeArgSpecification` from information from a decomposed fn arg once it's
/// been validated that the arg is in the expected `name: type` format.
Constructs a `ProbeArgSpecification` from information from a decomposed fn arg once it's
been validated that the arg is in the expected `name: type` format.
Constructs a ` ProbeArgSpecification ` from information from a decomposed fn arg once it ' s been validated that the arg is in the expected ` name : type ` format .
pub fn from_ident_type_pair(
        probe_method: &syn::TraitItemMethod,
        ordinal: usize,
        ident: &syn::PatIdent,
        typ: &syn::Type,
    ) -> TracersResult<ProbeArgSpecification> {
        //Note the type is annotated right here with the added lifetime information.  It's easier
        //and faster then to compute the annotations on the fly
        if let Some(arg_type_info) = argtypes::from_syn_type(typ) {
            let name = ident.ident.to_string();
            let probe_name = probe_method.sig.ident.to_string();
            let syn_typ = typ.clone();
            let syn_typ_with_lifetimes = Self::add_lifetimes_to_syn_type(&probe_name, &name, typ)?;
            Ok(ProbeArgSpecification {
                name,
                probe_name,
                ordinal,
                ident: ident.clone(),
                syn_typ,
                syn_typ_with_lifetimes,
                arg_type_info,
            })
        } else {
            Err(TracersError::invalid_provider(
                    format!("The argument type '{}' of argument '{}' on probe '{}' is not supported for probing.  Generally only the standard string, integer, and bool types, as well as references and Option's of the same, are supported", syn_helpers::convert_to_string(typ), ident.ident, probe_method.sig.ident), typ,
            ))
        }
    }
pub fn from_ident_type_pair ( probe_method : & syn :: TraitItemMethod , ordinal : usize , ident : & syn :: PatIdent , typ : & syn :: Type , ) -> TracersResult < ProbeArgSpecification > { //Note the type is annotated right here with the added lifetime information.  It's easier //and faster then to compute the annotations on the fly if let Some ( arg_type_info ) = argtypes :: from_syn_type ( typ ) { let name = ident . ident . to_string ( ) ; let probe_name = probe_method . sig . ident . to_string ( ) ; let syn_typ = typ . clone ( ) ; let syn_typ_with_lifetimes = Self :: add_lifetimes_to_syn_type ( & probe_name , & name , typ ) ? ; Ok ( ProbeArgSpecification { name , probe_name , ordinal , ident : ident . clone ( ) , syn_typ , syn_typ_with_lifetimes , arg_type_info , } ) } else { Err ( TracersError :: invalid_provider ( format ! ( " " syn_helpers convert_to_string ( typ ) ident ident probe_method sig ident ) , typ , ) ) } }
Constructs a `ProbeArgSpecification` from information from a decomposed fn arg once it's
been validated that the arg is in the expected `name: type` format.
Constructs a ` ProbeArgSpecification ` from information from a decomposed fn arg once it ' s been validated that the arg is in the expected ` name : type ` format .
probe_method
&syn::TraitItemMethod
ordinal
usize
ident
&syn::PatIdent
typ
&syn::Type
probe_method
&syn::TraitItemMethod
ordinal
usize
ident
&syn::PatIdent
typ
&syn::Type