pub fn open_tree(&self, name: Vec<u8>) -> Result<Arc<Tree>, ()> {
        let tenants = self.tenants.read().unwrap();
        if let Some(tree) = tenants.get(&name) {
            return Ok(tree.clone());
        }
        drop(tenants);

        let guard = pin();

        let mut tenants = self.tenants.write().unwrap();
        let tree = Arc::new(meta::open_tree(
            self.context.clone(),
            name.clone(),
            &guard,
        )?);
        tenants.insert(name, tree.clone());
        drop(tenants);
        Ok(tree)
    }
/// Open or create a new disk-backed Tree with its own keyspace,
/// accessible from the `Db` via the provided identifier.
Open or create a new disk-backed Tree with its own keyspace,
accessible from the `Db` via the provided identifier.
Open or create a new disk - backed Tree with its own keyspace accessible from the ` Db ` via the provided identifier .
pub fn open_tree(&self, name: Vec<u8>) -> Result<Arc<Tree>, ()> {
        let tenants = self.tenants.read().unwrap();
        if let Some(tree) = tenants.get(&name) {
            return Ok(tree.clone());
        }
        drop(tenants);
        let guard = pin();
        let mut tenants = self.tenants.write().unwrap();
        let tree = Arc::new(meta::open_tree(
            self.context.clone(),
            name.clone(),
            &guard,
        )?);
        tenants.insert(name, tree.clone());
        drop(tenants);
        Ok(tree)
    }
pub fn open_tree ( & self , name : Vec < u8 > ) -> Result < Arc < Tree > , ( ) > { let tenants = self . tenants . read ( ) . unwrap ( ) ; if let Some ( tree ) = tenants . get ( & name ) { return Ok ( tree . clone ( ) ) ; } drop ( tenants ) ; let guard = pin ( ) ; let mut tenants = self . tenants . write ( ) . unwrap ( ) ; let tree = Arc :: new ( meta :: open_tree ( self . context . clone ( ) , name . clone ( ) , & guard , ) ? ) ; tenants . insert ( name , tree . clone ( ) ) ; drop ( tenants ) ; Ok ( tree ) }
Open or create a new disk-backed Tree with its own keyspace,
accessible from the `Db` via the provided identifier.
Open or create a new disk - backed Tree with its own keyspace accessible from the ` Db ` via the provided identifier .
&self
name
Vec<u8>
&self
name
Vec<u8>