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: handler.rs
    path of file: ./repos/CYFS/src/component/cyfs-stack/src/router_handler
    
    the code of the file until where you have to start completion: use super::storage::RouterHandlerSavedData;
use super::storage::RouterHandlersStorage;
use cyfs_base::*;
use cyfs_debug::Mutex;
use cyfs_lib::*;
use cyfs_util::*;

use std::collections::BTreeMap;
    
    pub fn add_handler(&self, handler: RouterHandler<REQ, RESP>) -> BuckyResult<()> {
        if let Some(dec_id) = &handler.dec_id {
            self.storage.on_dec_register(dec_id);
        }

        let mut inner = self.handlers.lock().unwrap();
        let changed = inner.add_handler(handler)?;
        if changed {
            self.storage.async_save();
        }
        Ok(())
    }