fn generate_try_init_decl(&self) -> TokenStream {
        let vis = &self.spec().item_trait().vis;

        quote! {
            /// **NOTE**: This function was generated by the `tracers` macro
            ///
            /// Initializes the provider, if it isn't already initialized, and if initialization
            /// failed returns the error.
            ///
            /// # Usage
            ///
            /// Initializing the provider is not required.  By default, each provider will lazily
            /// initialize the first time a probe is fired.  Explicit initialization can be useful
            /// because it ensures that all of a provider's probes are registered and visible to
            /// the platform-specific tracing tools, like `bpftrace` or `tplist` on Linux.
            ///
            /// It's ok to initialize a provider more than once; init operations are idempotent and
            /// if repeated will not do anything
            ///
            /// # Returns
            ///
            /// The return value is a `Result<&'static str, &'static str>`.  The `Ok` value is a string
            /// with some information about the provider.  The `Err` value is an error message
            /// indicating the provider failed to initialize, and why.
            ///
            /// Note that whether or not the provider initialization failed, the `probe!` macros never
            /// return an error or panic.  They will detect the initialization failed and do nothing,
            /// not even evaluate the arguments to the probe.
            ///
            /// # Caution
            ///
            /// Callers should not call this method directly.  Instead use the provided
            /// `init_provider!` macro.  This will correctly elide the call when probing is
            /// compile-time disabled.  When `tracers` is compiled with tracing disabled, this function
            /// will not be generated so any code that assumes its presence will break;
            ///
            /// # Example
            ///
            /// ```
            /// use tracers_macros::{init_provider, tracer, probe};
            ///
            /// #[tracer]
            /// trait MyProbes {
            ///     fn probe0();
            /// }
            ///
            /// if let Err(err) = init_provider!(MyProbes) {
            ///     eprintln!("Probe provider failed to initialize: {}", err);
            /// }
            ///
            /// //Note that even if the provider fails to initialize, firing probes will never fail
            /// //or panic...
            ///
            /// println!("Firing anyway...");
            /// probe!(MyProbes::probe0());
            /// ```
            #[allow(dead_code)]
            #vis fn __try_init_provider() -> ::core::result::Result<&'static str, &'static str>
        }
    }
/// Generates the declaration (but *NOT* the *implementation*) of the `__try_init_provider` method.
/// This includes a detailed doc comment.  Each generator must implement this method, but this
/// generates the declaration, looking something like this:
///
/// ```no_execute
/// #[allow(dead_code)]
/// #vis fn __try_init_provider() -> Result<&'static str, &'static str>
/// ```
///
/// The actual generator should insert this token stream in the generated trait/struct, followed by
/// an implementation contained in `{}` chars
Generates the declaration (but *NOT* the *implementation*) of the `__try_init_provider` method.
This includes a detailed doc comment.  Each generator must implement this method, but this
generates the declaration, looking something like this.


Generates the declaration ( but * NOT * the * implementation * ) of the ` __try_init_provider ` method . This includes a detailed doc comment . Each generator must implement this method but this generates the declaration looking something like this .
fn generate_try_init_decl(&self) -> TokenStream {
        let vis = &self.spec().item_trait().vis;
        quote! {
            /// **NOTE**: This function was generated by the `tracers` macro
            ///
            /// Initializes the provider, if it isn't already initialized, and if initialization
            /// failed returns the error.
            ///
            /// # Usage
            ///
            /// Initializing the provider is not required.  By default, each provider will lazily
            /// initialize the first time a probe is fired.  Explicit initialization can be useful
            /// because it ensures that all of a provider's probes are registered and visible to
            /// the platform-specific tracing tools, like `bpftrace` or `tplist` on Linux.
            ///
            /// It's ok to initialize a provider more than once; init operations are idempotent and
            /// if repeated will not do anything
            ///
            /// # Returns
            ///
            /// The return value is a `Result<&'static str, &'static str>`.  The `Ok` value is a string
            /// with some information about the provider.  The `Err` value is an error message
            /// indicating the provider failed to initialize, and why.
            ///
            /// Note that whether or not the provider initialization failed, the `probe!` macros never
            /// return an error or panic.  They will detect the initialization failed and do nothing,
            /// not even evaluate the arguments to the probe.
            ///
            /// # Caution
            ///
            /// Callers should not call this method directly.  Instead use the provided
            /// `init_provider!` macro.  This will correctly elide the call when probing is
            /// compile-time disabled.  When `tracers` is compiled with tracing disabled, this function
            /// will not be generated so any code that assumes its presence will break;
            ///
            /// # Example
            ///
            /// ```
            /// use tracers_macros::{init_provider, tracer, probe};
            ///
            /// #[tracer]
            /// trait MyProbes {
            ///     fn probe0();
            /// }
            ///
            /// if let Err(err) = init_provider!(MyProbes) {
            ///     eprintln!("Probe provider failed to initialize: {}", err);
            /// }
            ///
            /// //Note that even if the provider fails to initialize, firing probes will never fail
            /// //or panic...
            ///
            /// println!("Firing anyway...");
            /// probe!(MyProbes::probe0());
            /// ```
            #[allow(dead_code)]
            #vis fn __try_init_provider() -> ::core::result::Result<&'static str, &'static str>
        }
    }
fn generate_try_init_decl ( & self ) -> TokenStream { let vis = & self . spec ( ) . item_trait ( ) . vis ; quote ! { /// **NOTE**: This function was generated by the `tracers` macro /// Initializes the provider, if it isn't already initialized, and if initialization /// failed returns the error. /// # Usage /// Initializing the provider is not required.  By default, each provider will lazily /// initialize the first time a probe is fired.  Explicit initialization can be useful /// because it ensures that all of a provider's probes are registered and visible to /// the platform-specific tracing tools, like `bpftrace` or `tplist` on Linux. /// It's ok to initialize a provider more than once; init operations are idempotent and /// if repeated will not do anything /// # Returns /// The return value is a `Result<&'static str, &'static str>`.  The `Ok` value is a string /// with some information about the provider.  The `Err` value is an error message /// indicating the provider failed to initialize, and why. /// Note that whether or not the provider initialization failed, the `probe!` macros never /// return an error or panic.  They will detect the initialization failed and do nothing, /// not even evaluate the arguments to the probe. /// # Caution /// Callers should not call this method directly.  Instead use the provided /// `init_provider!` macro.  This will correctly elide the call when probing is /// compile-time disabled.  When `tracers` is compiled with tracing disabled, this function /// will not be generated so any code that assumes its presence will break; /// # Example /// ``` /// use tracers_macros::{init_provider, tracer, probe}; /// #[tracer] /// trait MyProbes { ///     fn probe0(); /// } /// if let Err(err) = init_provider!(MyProbes) { ///     eprintln!("Probe provider failed to initialize: {}", err); /// } /// //Note that even if the provider fails to initialize, firing probes will never fail /// //or panic... /// println!("Firing anyway..."); /// probe!(MyProbes::probe0()); /// ``` [ allow ( dead_code ) ] vis fn __try_init_provider ( ) core result Result ' static str ' static str } }
Generates the declaration (but *NOT* the *implementation*) of the `__try_init_provider` method.
Generates the declaration ( but * NOT * the * implementation * ) of the ` __try_init_provider ` method .
&self
&self
[allow(dead_code)]
None
vis fn __try_init_provider() -> result<&'static str, &'static str>


The actual generator should insert this token stream in the generated trait/struct, followed by
an implementation contained in `{}` chars
The actual generator should insert this token stream in the generated trait / struct followed by an implementation contained in ` {} ` chars