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: composite_recorder.rs
    path of file: ./repos/readyset/readyset-server/src/metrics
    
    the code of the file until where you have to start completion: #![allow(clippy::option_map_unit_fn)]
use std::sync::Arc;

use metrics::{Counter, Gauge, Histogram, KeyName, Metadata, Recorder, SharedString, Unit};
use metrics_exporter_prometheus::PrometheusRecorder;
use readyset_client::metrics::Key;

use crate::metrics::recorders::MetricsRecorder;
use crate::metrics::{Clear, Render};
use crate::NoriaMetricsRecorder;

/// A recorder that maintains a set of recorders and notifies all of them of all updates.
#[derive(Default)]
pub struct CompositeMetricsRecorder {
    n
    
    fn register_histogram(&self, key: &Key, metadata: &Metadata<'_>) -> Histogram {
        match (&self.prom_recorder, &self.noria_recorder) {
            (Some(p), None) => p.register_histogram(key, metadata),
            (None, Some(n)) => n.register_histogram(key, metadata),
            (None, None) => Histogram::noop(),
            (Some(p), Some(n)) => Arc::new(CompositeHistogram {
                noria: n.register_histogram(key, metadata),
                prom: p.register_histogram(key, metadata),
            })
            .into(),
        }
    }