StorageStateStrategy

Trait StorageStateStrategy 

Source
pub trait StorageStateStrategy {
    // Required methods
    fn get_content_chunks(
        &self,
        encoding: &AssetEncoding,
        chunk_index: usize,
        memory: &Memory,
    ) -> Option<Blob>;
    fn get_public_asset(
        &self,
        full_path: FullPath,
        token: AssetAccessToken,
    ) -> Option<(Asset, Memory)>;
    fn get_rule(&self, collection: &CollectionKey) -> Result<Rule, String>;
    fn get_config(&self) -> StorageConfig;
    fn get_domains(&self) -> CustomDomains;
    fn get_asset(
        &self,
        collection: &CollectionKey,
        full_path: &FullPath,
        rule: &Rule,
    ) -> Option<Asset>;
    fn insert_asset(
        &self,
        collection: &CollectionKey,
        full_path: &FullPath,
        asset: &Asset,
        rule: &Rule,
    );
    fn insert_asset_encoding(
        &self,
        full_path: &FullPath,
        encoding_type: &str,
        encoding: &AssetEncoding,
        asset: &mut Asset,
        rule: &Rule,
    );
    fn delete_asset(
        &self,
        collection: &CollectionKey,
        full_path: &FullPath,
        rule: &Rule,
    ) -> Option<Asset>;
    fn init_certified_assets(&self);
}

Required Methods§

Source

fn get_content_chunks( &self, encoding: &AssetEncoding, chunk_index: usize, memory: &Memory, ) -> Option<Blob>

Source

fn get_public_asset( &self, full_path: FullPath, token: AssetAccessToken, ) -> Option<(Asset, Memory)>

Source

fn get_rule(&self, collection: &CollectionKey) -> Result<Rule, String>

Source

fn get_config(&self) -> StorageConfig

Source

fn get_domains(&self) -> CustomDomains

Source

fn get_asset( &self, collection: &CollectionKey, full_path: &FullPath, rule: &Rule, ) -> Option<Asset>

Source

fn insert_asset( &self, collection: &CollectionKey, full_path: &FullPath, asset: &Asset, rule: &Rule, )

Source

fn insert_asset_encoding( &self, full_path: &FullPath, encoding_type: &str, encoding: &AssetEncoding, asset: &mut Asset, rule: &Rule, )

Source

fn delete_asset( &self, collection: &CollectionKey, full_path: &FullPath, rule: &Rule, ) -> Option<Asset>

Source

fn init_certified_assets(&self)

Implementors§