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: stream.rs
    path of file: ./repos/webrtc/constraints/src/constraints
    
    the code of the file until where you have to start completion: #[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};

use super::track::GenericBoolOrMediaTrackConstraints;
use crate::MediaTrackConstraint;

/// The constraints for a [`MediaStream`][media_stream] object.
///
/// # W3C Spec Compliance
///
/// Corresponds to [`MediaStreamConstraints`][media_stream_constraints]
/// from the W3C ["Media Capture and Streams"][media_capture_and_streams_spec] spec.
///
/// [media_stream]: https://www.w3.org/TR/mediacapture-streams/#dom-mediastream
/// [media_stream_constraints]: https://www.w3.org/TR/mediacapture-streams/#dom-mediastreamconstraints
/// [media_capture_and_streams_spec]: https://www.w3.org/TR/mediacapture-streams/
pub type MediaStreamConstraints = GenericMediaStreamConstraints<MediaTrackConstraint>;

/// The constraints for a [`MediaStream`][media_stream] object.
///
/// # W3C 
    
    fn customized() {
        let subject = Subject {
            audio: BoolOrMediaTrackConstraints::Constraints(MediaTrackConstraints {
                mandatory: MandatoryMediaTrackConstraints::from_iter([
                    (&DEVICE_ID, "microphone".into()),
                    (&CHANNEL_COUNT, 2.into()),
                ]),
                advanced: AdvancedMediaTrackConstraints::new(vec![
                    MediaTrackConstraintSet::from_iter([(&LATENCY, 0.123.into())]),
                ]),
            }),
            video: BoolOrMediaTrackConstraints::Bool(true),
        };
        let json = serde_json::json!({
            "audio": {
                "deviceId": "microphone",
                "channelCount": 2_i64,
                "advanced": [
                    { "latency": 0.123_f64, }
                ]
            },
            "video": true,
        });
        test_serde_symmetry!(subject: subject, json: json);
    }