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

use serde::{Deserialize, Serialize};

use crate::{
    ErrorKind, Interface, InterfaceType, Interfaces, MergedInterface,
    NmstateError, VlanProtocol,
};

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
#[serde(rename_all = "kebab-case", deny_unknown_fields)]
#[non_exhaustive]
/// Single Root I
    
    pub(crate) fn sanitize(&mut self) -> Result<(), NmstateError> {
        if let Some(vfs) = self.vfs.as_mut() {
            for vf in vfs.iter_mut() {
                if let Some(address) = vf.mac_address.as_mut() {
                    address.make_ascii_uppercase()
                }

                if let Some(VlanProtocol::Ieee8021Ad) = vf.vlan_proto {
                    if vf.vlan_id.unwrap_or_default() == 0
                        && vf.qos.unwrap_or_default() == 0
                    {
                        let e = NmstateError::new(
                                ErrorKind::InvalidArgument,
                                "VLAN protocol 802.1ad is not allowed when both VLAN ID and VLAN QoS are zero or unset"
                                    .to_string(),);
                        log::error!("VF ID {}: {}", vf.id, e);
                        return Err(e);
                    }
                }
            }
            vfs.sort_unstable_by(|a, b| a.id.cmp(&b.id));
        }

        Ok(())
    }