fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest {
        let interest = self.filter.callsite_enabled(metadata);

        // If the filter didn't disable the callsite, allow the inner layer to
        // register it — since `register_callsite` is also used for purposes
        // such as reserving/caching per-callsite data, we want the inner layer
        // to be able to perform any other registration steps. However, we'll
        // ignore its `Interest`.
        if !interest.is_never() {
            self.layer.register_callsite(metadata);
        }

        // Add our `Interest` to the current sum of per-layer filter `Interest`s
        // for this callsite.
        FILTERING.with(|filtering| filtering.add_interest(interest));

        // don't short circuit! if the stack consists entirely of `Layer`s with
        // per-layer filters, the `Registry` will return the actual `Interest`
        // value that's the sum of all the `register_callsite` calls to those
        // per-layer filters. if we returned an actual `never` interest here, a
        // `Layered` layer would short-circuit and not allow any `Filtered`
        // layers below us if _they_ are interested in the callsite.
        Interest::always()
    }
// TODO(eliza): can we figure out a nice way to make the `Filtered` layer
// not call `is_enabled_for` in hooks that the inner layer doesn't actually
// have real implementations of? probably not...
//
// it would be cool if there was some wild rust reflection way of checking
// if a trait impl has the default impl of a trait method or not, but that's
// almsot certainly impossible...right?
can we figure out a nice way to make the `Filtered` layer
not call `is_enabled_for` in hooks that the inner layer doesn't actually
have real implementations of. probably not


can we figure out a nice way to make the ` Filtered ` layer not call ` is_enabled_for ` in hooks that the inner layer doesn ' t actually have real implementations of . probably not
fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest {
        let interest = self.filter.callsite_enabled(metadata);
        // If the filter didn't disable the callsite, allow the inner layer to
        // register it — since `register_callsite` is also used for purposes
        // such as reserving/caching per-callsite data, we want the inner layer
        // to be able to perform any other registration steps. However, we'll
        // ignore its `Interest`.
        if !interest.is_never() {
            self.layer.register_callsite(metadata);
        }
        // Add our `Interest` to the current sum of per-layer filter `Interest`s
        // for this callsite.
        FILTERING.with(|filtering| filtering.add_interest(interest));
        // don't short circuit! if the stack consists entirely of `Layer`s with
        // per-layer filters, the `Registry` will return the actual `Interest`
        // value that's the sum of all the `register_callsite` calls to those
        // per-layer filters. if we returned an actual `never` interest here, a
        // `Layered` layer would short-circuit and not allow any `Filtered`
        // layers below us if _they_ are interested in the callsite.
        Interest::always()
    }
fn register_callsite ( & self , metadata : & ' static Metadata < ' static > ) -> Interest { let interest = self . filter . callsite_enabled ( metadata ) ; // If the filter didn't disable the callsite, allow the inner layer to // register it — since `register_callsite` is also used for purposes // such as reserving/caching per-callsite data, we want the inner layer // to be able to perform any other registration steps. However, we'll // ignore its `Interest`. if ! interest . is_never ( ) { self . layer . register_callsite ( metadata ) ; } // Add our `Interest` to the current sum of per-layer filter `Interest`s // for this callsite. FILTERING . with ( | filtering | filtering . add_interest ( interest ) ) ; // don't short circuit! if the stack consists entirely of `Layer`s with // per-layer filters, the `Registry` will return the actual `Interest` // value that's the sum of all the `register_callsite` calls to those // per-layer filters. if we returned an actual `never` interest here, a // `Layered` layer would short-circuit and not allow any `Filtered` // layers below us if _they_ are interested in the callsite. Interest :: always ( ) }
TODO(eliza): can we figure out a nice way to make the `Filtered` layer
not call `is_enabled_for` in hooks that the inner layer doesn't actually
have real implementations of?
TODO ( eliza ) : can we figure out a nice way to make the ` Filtered ` layer not call ` is_enabled_for ` in hooks that the inner layer doesn ' t actually have real implementations of?
&self
metadata
&'static Metadata<'static>
&self
metadata
&'static Metadata<'static>