Interface

Trait Interface 

Source
pub trait Interface {
    // Required methods
    fn root(&self) -> PathBuf;
    fn find_container(&self, search: StdPropsFilter) -> Option<Container>;
    fn find_containers(&self, search: StdPropsFilter) -> Vec<Container>;
    fn find_asset(&self, search: StdPropsFilter) -> Option<Asset>;
    fn find_assets(&self, search: StdPropsFilter) -> Vec<Asset>;
    fn add_asset(&mut self, asset: Asset) -> Result;
    fn dev_mode() -> bool;
}

Required Methods§

Source

fn root(&self) -> PathBuf

Returns the root of the database.

Source

fn find_container(&self, search: StdPropsFilter) -> Option<Container>

Finds a single Container matching the search fitler.

Source

fn find_containers(&self, search: StdPropsFilter) -> Vec<Container>

Finds all Containers matching the search filter.

Source

fn find_asset(&self, search: StdPropsFilter) -> Option<Asset>

Finds a single Asset matching the search filter.

Source

fn find_assets(&self, search: StdPropsFilter) -> Vec<Asset>

Finds all Assets matching the search filter.

Source

fn add_asset(&mut self, asset: Asset) -> Result

Adds an Asset to the database.

Source

fn dev_mode() -> bool

Returns whether the datbase is running in development mode or not.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§