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: manager.rs
    path of file: ./repos/CYFS/src/component/cyfs-stack/src/default_app
    
    the code of the file until where you have to start completion: use cyfs_base::*;
use cyfs_core::*;
use cyfs_lib::*;
use cyfs_debug::Mutex;


use std::sync::Arc;

// default app list是device为粒度，还是people？暂时以device为粒度
const DEVICE_DEFAULT_APP_LIST_ID: &str = "device-default-app-list";

struct DefaultAppManager {
    list: Arc<Mutex<Option<DefaultAppList>>>,
    noc: NamedObjectCacheRef,

    // 当前设备id
    device_id: DeviceId,
}

impl DefaultAppManager {
    pub fn new(device_id: &DeviceId, noc: NamedObjectCacheRef) -> Self {
        Self {
            list: Arc::new(Mutex::new(None)),
            noc,
            device_id: device_id.to_owned(),
        }
    }

    pub async fn set_default_app(&self, group: &str, info: DefaultAppInfo) -> BuckyResult<()> {
        // FIXME 这里是否要检查是不是支持的grou
    
    async fn load_from_noc(&self) -> BuckyResult<Option<DefaultAppList>> {
        let object_id = DefaultAppList::generate_id(
            self.device_id.object_id().to_owned(),
            DEVICE_DEFAULT_APP_LIST_ID,
        );
        let req = NamedObjectCacheGetObjectRequest {
            protocol: RequestProtocol::Native,
            object_id,
            source: self.device_id.clone(),
            flags: 0,
        };

        if let Some(data) = self.noc.get_object(&req).await? {
            debug!("get default app list object from noc: {}", req.object_id);

            let object_raw = data.object_raw.unwrap();
            let (obj, _) = DefaultAppList::raw_decode(&object_raw).map_err(|e| {
                error!(
                    "decode default app list object from raw data failed! obj={} err={}",
                    object_id, e
                );
                e
            })?;

            Ok(Some(obj))
        } else {
            Ok(None)
        }
    }