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§
fn storage_id(&self) -> StorageId
Sourcefn capacity(&self, stats: &StorageStatsTable) -> Result<StorageCapacity>
fn capacity(&self, stats: &StorageStatsTable) -> Result<StorageCapacity>
Storage capacity at the current level.
Sourcefn min_capacity(&self) -> StorageCapacity
fn min_capacity(&self) -> StorageCapacity
Storage capacity at its minimum level.
Sourcefn max_capacity(&self) -> StorageCapacity
fn max_capacity(&self) -> StorageCapacity
Storage capacity at its maximum level.