pub async fn delete_config_object(
        &mut self,
        metadata: &mut NexusMetaData,
        selected: u32,
    ) -> Result<(), MetaDataError> {
        if metadata.index.len() != metadata.header.used_entries as usize {
            return Err(MetaDataError::IndexInconsistent {});
        }

        if selected < metadata.header.used_entries {
            metadata.index.remove(selected as usize);
            metadata.header.used_entries -= 1;
        }

        self.sync_metadata(metadata).await
    }
/// Remove selected config object from "MetaData" partition.
/// The "selected" parameter identifies the appropriate entry in the index
/// array.
Remove selected config object from "MetaData" partition.
The "selected" parameter identifies the appropriate entry in the index
array.
Remove selected config object from " MetaData " partition . The " selected " parameter identifies the appropriate entry in the index array .
pub async fn delete_config_object(
        &mut self,
        metadata: &mut NexusMetaData,
        selected: u32,
    ) -> Result<(), MetaDataError> {
        if metadata.index.len() != metadata.header.used_entries as usize {
            return Err(MetaDataError::IndexInconsistent {});
        }
        if selected < metadata.header.used_entries {
            metadata.index.remove(selected as usize);
            metadata.header.used_entries -= 1;
        }
        self.sync_metadata(metadata).await
    }
pub async fn delete_config_object ( & mut self , metadata : & mut NexusMetaData , selected : u32 , ) -> Result < ( ) , MetaDataError > { if metadata . index . len ( ) != metadata . header . used_entries as usize { return Err ( MetaDataError :: IndexInconsistent { } ) ; } if selected < metadata . header . used_entries { metadata . index . remove ( selected as usize ) ; metadata . header . used_entries -= 1 ; } self . sync_metadata ( metadata ) . await }
Remove selected config object from "MetaData" partition.
Remove selected config object from " MetaData " partition .
&mut self
metadata
&mut NexusMetaData
selected
u32