/// Create a new `RafsSuper` instance from a `RafsConfig` object.
Create a new `RafsSuper` instance from a `RafsConfig` object.
Create a new ` RafsSuper ` instance from a ` RafsConfig ` object .
pub fn new(conf: &RafsConfig) -> Result<Self> {
        let mut rs = Self::default();
        match conf.mode.as_str() {
            "direct" => rs.mode = RafsMode::Direct,
            "cached" => rs.mode = RafsMode::Cached,
            _ => return Err(einval!("Rafs mode should be 'direct' or 'cached'")),
        }
        rs.validate_digest = conf.digest_validate;
        Ok(rs)
    }
pub fn new ( conf : & RafsConfig ) -> Result < Self > { let mut rs = Self :: default ( ) ; match conf . mode . as_str ( ) { " " => rs . mode = RafsMode :: Direct , " " => rs . mode = RafsMode :: Cached , _ => return Err ( einval ! ( " " ) ) , } rs . validate_digest = conf . digest_validate ; Ok ( rs ) }
Create a new `RafsSuper` instance from a `RafsConfig` object.
Create a new ` RafsSuper ` instance from a ` RafsConfig ` object .
conf
&RafsConfig