Skip to main content

Storage

Trait Storage 

Source
pub trait Storage: Building {
    // Required methods
    fn storage_id(&self) -> StorageId;
    fn capacity(&self, stats: &StorageStatsTable) -> Result<StorageCapacity>;
    fn min_capacity(&self) -> StorageCapacity;
    fn max_capacity(&self) -> StorageCapacity;
}
Expand description

A building that stores resources.

Required Methods§

Source

fn storage_id(&self) -> StorageId

Source

fn capacity(&self, stats: &StorageStatsTable) -> Result<StorageCapacity>

Storage capacity at the current level.

Source

fn min_capacity(&self) -> StorageCapacity

Storage capacity at its minimum level.

Source

fn max_capacity(&self) -> StorageCapacity

Storage capacity at its maximum level.

Implementors§