You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: layered.rs
    path of file: ./repos/tracing/tracing-subscriber/src/subscribe
    
    the code of the file until where you have to start completion: use tracing_core::{
    collect::{Collect, Interest},
    metadata::Metadata,
    span, Dispatch, Event, LevelFilter,
};

use crate::{
    filter,
    registry::LookupSpan,
    subscribe::{Context, Subscribe},
};
#[cfg(all(feature = "registry", feature = "std"))]
use crate::{filter::FilterId, registry::Registry};
use core::{
    any::{Any, TypeId},
    cmp, fmt,
    marker::PhantomData,
    ptr::NonNull,
};

/// A [collector] composed of a [collector] wrapped by one or more
/// [subscriber]s.
///
/// [subscriber]: crate::Subscrib
    
    pub(super) fn new(subscriber: A, inner: B, inner_has_subscriber_filter: bool) -> Self {
        #[cfg(all(feature = "registry", feature = "std"))]
        let inner_is_registry = TypeId::of::<C>() == TypeId::of::<crate::registry::Registry>();
        #[cfg(not(all(feature = "registry", feature = "std")))]
        let inner_is_registry = false;

        let inner_has_subscriber_filter = inner_has_subscriber_filter || inner_is_registry;
        let has_subscriber_filter = filter::subscriber_has_psf(&subscriber);
        Self {
            subscriber,
            inner,
            has_subscriber_filter,
            inner_has_subscriber_filter,
            inner_is_registry,
            _s: PhantomData,
        }
    }