/// Returns the volume with the given name.  This is not thread-safe.
Returns the volume with the given name.  This is not thread-safe.
Returns the volume with the given name . This is not thread - safe .
pub async fn volume(
        &self,
        volume_name: &str,
        crypt: Arc<dyn Crypt>,
    ) -> Result<Arc<ObjectStore>, Error> {
        let object_id =
            match self.volume_directory().lookup(volume_name).await?.ok_or(FxfsError::NotFound)? {
                (object_id, ObjectDescriptor::Volume) => object_id,
                _ => bail!(anyhow!(FxfsError::Inconsistent).context("Expected volume")),
            };
        let store = self.filesystem.object_manager().open_store(object_id, crypt).await?;
        store.set_trace(self.filesystem.trace());
        Ok(store)
    }
pub async fn volume ( & self , volume_name : & str , crypt : Arc < dyn Crypt > , ) -> Result < Arc < ObjectStore > , Error > { let object_id = match self . volume_directory ( ) . lookup ( volume_name ) . await ? . ok_or ( FxfsError :: NotFound ) ? { ( object_id , ObjectDescriptor :: Volume ) => object_id , _ => bail ! ( anyhow ( FxfsError Inconsistent ) context ( " " ) ) , } ; let store = self . filesystem . object_manager ( ) . open_store ( object_id , crypt ) . await ? ; store . set_trace ( self . filesystem . trace ( ) ) ; Ok ( store ) }
Returns the volume with the given name.
Returns the volume with the given name .
&self
volume_name
&str
crypt
Arc<dyn Crypt>