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

        if NexusChild::fragmented(metadata.header.data_start, &metadata.index)?
        {
            if let Err(error) = self.compact(metadata).await {
                warn!("Error compacting MetaData: {}", error);
            }
        }

        self.write_config_object(metadata, config, now).await?;
        self.sync_metadata(metadata).await
    }
/// Append a new config object to "MetaData" partition.
Append a new config object to "MetaData" partition.
Append a new config object to " MetaData " partition .
pub async fn append_config_object(
        &mut self,
        metadata: &mut NexusMetaData,
        config: &NexusConfig,
        now: &SystemTime,
    ) -> Result<(), MetaDataError> {
        if metadata.index.len() != metadata.header.used_entries as usize {
            return Err(MetaDataError::IndexInconsistent {});
        }
        if NexusChild::fragmented(metadata.header.data_start, &metadata.index)?
        {
            if let Err(error) = self.compact(metadata).await {
                warn!("Error compacting MetaData: {}", error);
            }
        }
        self.write_config_object(metadata, config, now).await?;
        self.sync_metadata(metadata).await
    }
pub async fn append_config_object ( & mut self , metadata : & mut NexusMetaData , config : & NexusConfig , now : & SystemTime , ) -> Result < ( ) , MetaDataError > { if metadata . index . len ( ) != metadata . header . used_entries as usize { return Err ( MetaDataError :: IndexInconsistent { } ) ; } if NexusChild :: fragmented ( metadata . header . data_start , & metadata . index ) ? { if let Err ( error ) = self . compact ( metadata ) . await { warn ! ( " " error ) ; } } self . write_config_object ( metadata , config , now ) . await ? ; self . sync_metadata ( metadata ) . await }
Append a new config object to "MetaData" partition.
Append a new config object to " MetaData " partition .
&mut self
metadata
&mut NexusMetaData
config
&NexusConfig
now
&SystemTime