pub fn from_object(object: &Object<'_>) -> Result<Self, CfiError> {
        let mut buffer = vec![];
        write_preamble(&mut buffer, CFICACHE_LATEST_VERSION)?;
        AsciiCfiWriter::new(&mut buffer).process(object)?;

        let byteview = ByteView::from_vec(buffer);
        let inner = CfiCacheInner::Versioned(CFICACHE_LATEST_VERSION, CfiCacheV1 { byteview });
        Ok(CfiCache { inner })
    }
/// Construct a CFI cache from an `Object`.
Construct a CFI cache from an `Object`.
Construct a CFI cache from an ` Object ` .
pub fn from_object(object: &Object<'_>) -> Result<Self, CfiError> {
        let mut buffer = vec![];
        write_preamble(&mut buffer, CFICACHE_LATEST_VERSION)?;
        AsciiCfiWriter::new(&mut buffer).process(object)?;
        let byteview = ByteView::from_vec(buffer);
        let inner = CfiCacheInner::Versioned(CFICACHE_LATEST_VERSION, CfiCacheV1 { byteview });
        Ok(CfiCache { inner })
    }
pub fn from_object ( object : & Object < ' _ > ) -> Result < Self , CfiError > { let mut buffer = vec ! [ ] ; write_preamble ( & mut buffer , CFICACHE_LATEST_VERSION ) ? ; AsciiCfiWriter :: new ( & mut buffer ) . process ( object ) ? ; let byteview = ByteView :: from_vec ( buffer ) ; let inner = CfiCacheInner :: Versioned ( CFICACHE_LATEST_VERSION , CfiCacheV1 { byteview } ) ; Ok ( CfiCache { inner } ) }
Construct a CFI cache from an `Object`.
Construct a CFI cache from an ` Object ` .
object
&Object<'_>
object
&Object<'_>