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: configuration.rs
    path of file: ./repos/plotly/plotly/src
    
    the code of the file until where you have to start completion: use serde::{ser::Serializer, Serialize};
use serde_repr::Serialize_repr;

#[derive(Serialize, Debug, Clone)]
#[serde(rename_all = "lowercase")]
pub enum ImageButtonFormats {
    Png,
    Svg,
    Jpeg,
    Webp,
}

// TODO: should this be behind the plotly-kaleido feature?
#[serde_with::skip_serializing_none]
#[derive(Serialize, Debug, Default, Clone)]
pub struct ToImageButtonOptions {
    format: Option<ImageButtonFormats>,
    filename: Option<String>,
    height: Option<usize>,
    width: Option<usize>,
    scale: Option<usize>,
}

impl ToImageButtonOptions {
    /// Create a new empty `ToImageButtonOptions` configuration struct.
    pub fn new() -> Self {
        Default::default()
    }

    /// Set the file format of the downloaded plot image.
    pub fn format(mut self, format: ImageButtonFormats) -> Self {
        self.format = Some(format);
        self
    }

    /// Set the filename of the downloaded plot image.
    pub fn filename(mut self, filename: &str) -> Self {
        self.filename = Some(filename.to_string());
        self
    }

    /// Set the height, in pixels, of the downloaded plot image.
    pub fn height(mut self, height: usize) -> Self {
        self.height = Some(height);
        self
    }

    /// Set the width, in pixels, of the downloaded plot image.
    pub fn width(mut self, width: usize) -> Self {
        self.width = Some(width);
        self
    }

    /// Set the scale of the downloaded plot image. Title, legend, axis and
    /// canvas sizes will all be multiplied by `scale`.
    pub fn scale(mut self, scale: usize) -> Self {
        self.scale = Some(scale);
        self
    }
}

#[derive(Debug, Clone)]
pub enum DisplayModeBar {
    Hover,
    True,
    False,
}

impl Serialize for DisplayModeBar {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: Serializer,
    {
        match *self {
            Self::Hover => serializer.serialize_str("hover"),
            Self::True => serializer.serialize_bool(true),
   
    
    fn test_serialize_mode_bar_button_name() {
        assert_eq!(to_value(ModeBarButtonName::Zoom2d).unwrap(), json!("zoom2d"));
        assert_eq!(to_value(ModeBarButtonName::Pan2d).unwrap(), json!("pan2d"));
        assert_eq!(to_value(ModeBarButtonName::Select2d).unwrap(), json!("select2d"));
        assert_eq!(to_value(ModeBarButtonName::Lasso2d).unwrap(), json!("lasso2d"));
        assert_eq!(to_value(ModeBarButtonName::ZoomIn2d).unwrap(), json!("zoomIn2d"));
        assert_eq!(to_value(ModeBarButtonName::ZoomOut2d).unwrap(), json!("zoomOut2d"));
        assert_eq!(to_value(ModeBarButtonName::AutoScale2d).unwrap(), json!("autoScale2d"));
        assert_eq!(to_value(ModeBarButtonName::ResetScale2d).unwrap(), json!("resetScale2d"));
        assert_eq!(to_value(ModeBarButtonName::Zoom3d).unwrap(), json!("zoom3d"));
        assert_eq!(to_value(ModeBarButtonName::Pan3d).unwrap(), json!("pan3d"));
        assert_eq!(to_value(ModeBarButtonName::ResetCameraDefault3d).unwrap(), json!("resetCameraDefault3d"));
        assert_eq!(to_value(ModeBarButtonName::ResetCameraLastSave3d).unwrap(), json!("resetCameraLastSave3d"));
        assert_eq!(to_value(ModeBarButtonName::HoverClosest3d).unwrap(), json!("hoverClosest3d"));
        assert_eq!(to_value(ModeBarButtonName::OrbitRotation).unwrap(), json!("orbitRotation"));
        assert_eq!(to_value(ModeBarButtonName::TableRotation).unwrap(), json!("tableRotation"));
        assert_eq!(to_value(ModeBarButtonName::HoverClosestCartesian).unwrap(), json!("hoverClosestCartesian"));
        assert_eq!(to_value(ModeBarButtonName::HoverCompareCartesian).unwrap(), json!("hoverCompareCartesian"));
        assert_eq!(to_value(ModeBarButtonName::ZoomInGeo).unwrap(), json!("zoomInGeo"));
        assert_eq!(to_value(ModeBarButtonName::ZoomOutGeo).unwrap(), json!("zoomOutGeo"));
        assert_eq!(to_value(ModeBarButtonName::ResetGeo).unwrap(), json!("resetGeo"));
        assert_eq!(to_value(ModeBarButtonName::HoverClosestGeo).unwrap(), json!("hoverClosestGeo"));
        assert_eq!(to_value(ModeBarButtonName::HoverClosestGl2d).unwrap(), json!("hoverClosestGl2d"));
        assert_eq!(to_value(ModeBarButtonName::HoverClosestPie).unwrap(), json!("hoverClosestPie"));
        assert_eq!(to_value(ModeBarButtonName::ToggleHover).unwrap(), json!("toggleHover"));
        assert_eq!(to_value(ModeBarButtonName::ResetViews).unwrap(), json!("resetViews"));
        assert_eq!(to_value(ModeBarButtonName::ToImage).unwrap(), json!("toImage"));
        assert_eq!(to_value(ModeBarButtonName::SendDataToCloud).unwrap(), json!("sendDataToCloud"));
        assert_eq!(to_value(ModeBarButtonName::ToggleSpikelines).unwrap(), json!("toggleSpikelines"));
        assert_eq!(to_value(ModeBarButtonName::ResetViewMapbox).unwrap(), json!("resetViewMapbox"));
        assert_eq!(to_value(ModeBarButtonName::ZoomInMapbox).unwrap(), json!("zoomInMapbox"));
        assert_eq!(to_value(ModeBarButtonName::ZoomOutMapbox).unwrap(), json!("zoomOutMapbox"));
    }