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: wired.rs
    path of file: ./repos/nmstate/rust/src/lib/nm/nm_dbus/connection
    
    the code of the file until where you have to start completion: // SPDX-License-Identifier: Apache-2.0

use std::collections::HashMap;
use std::convert::TryFrom;

use serde::Deserialize;

use super::super::{
    connection::DbusDictionary,
    convert::mac_str_to_u8_array,
    convert::{own_value_to_bytes_array, u8_array_to_mac_string},
    NmError, ToDbusValue,
};

#[derive(Debug, Clone, PartialEq, Default, Deserialize)]
#[serde(try_from = "DbusDictionary")]
#[non_exhaustive]
pub struct NmSettingWired {
    pub cloned_mac_address: Opt
    
    fn to_value(&self) -> Result<HashMap<&str, zvariant::Value>, NmError> {
        let mut ret = HashMap::new();
        if let Some(v) = &self.cloned_mac_address {
            ret.insert(
                "cloned-mac-address",
                zvariant::Value::new(mac_str_to_u8_array(v)),
            );
        }
        if let Some(v) = &self.mac_address {
            ret.insert(
                "mac-address",
                zvariant::Value::new(mac_str_to_u8_array(v)),
            );
        }
        if let Some(v) = &self.mtu {
            ret.insert("mtu", zvariant::Value::new(v));
        }
        if let Some(v) = &self.accept_all_mac_addresses {
            ret.insert("accept-all-mac-addresses", zvariant::Value::new(v));
        }
        if let Some(v) = &self.speed {
            ret.insert("speed", zvariant::Value::new(v));
        }
        if let Some(v) = &self.auto_negotiate {
            ret.insert("auto-negotiate", zvariant::Value::new(v));
        }
        if let Some(v) = &self.duplex {
            ret.insert("duplex", zvariant::Value::new(v));
        }
        ret.extend(self._other.iter().map(|(key, value)| {
            (key.as_str(), zvariant::Value::from(value.clone()))
        }));
        Ok(ret)
    }