pub trait AssetIterator<'a>: Iterator<Item = &'a AssetRef> + Sizedwhere
Self: 'a,{
// Provided methods
fn filter_agent(
self,
agent_id: &'a AgentID,
) -> impl Iterator<Item = &'a AssetRef> + 'a { ... }
fn filter_primary_producers_of(
self,
commodity_id: &'a CommodityID,
) -> impl Iterator<Item = &'a AssetRef> + 'a { ... }
fn filter_region(
self,
region_id: &'a RegionID,
) -> impl Iterator<Item = &'a AssetRef> + 'a { ... }
fn flows_for_commodity(
self,
commodity_id: &'a CommodityID,
) -> impl Iterator<Item = (&'a AssetRef, &'a ProcessFlow)> + 'a { ... }
}
Expand description
Additional methods for iterating over assets
Provided Methods§
Sourcefn filter_agent(
self,
agent_id: &'a AgentID,
) -> impl Iterator<Item = &'a AssetRef> + 'a
fn filter_agent( self, agent_id: &'a AgentID, ) -> impl Iterator<Item = &'a AssetRef> + 'a
Filter assets by the agent that owns them
Sourcefn filter_primary_producers_of(
self,
commodity_id: &'a CommodityID,
) -> impl Iterator<Item = &'a AssetRef> + 'a
fn filter_primary_producers_of( self, commodity_id: &'a CommodityID, ) -> impl Iterator<Item = &'a AssetRef> + 'a
Iterate over assets that have the given commodity as a primary output
Sourcefn filter_region(
self,
region_id: &'a RegionID,
) -> impl Iterator<Item = &'a AssetRef> + 'a
fn filter_region( self, region_id: &'a RegionID, ) -> impl Iterator<Item = &'a AssetRef> + 'a
Filter the assets by region
Sourcefn flows_for_commodity(
self,
commodity_id: &'a CommodityID,
) -> impl Iterator<Item = (&'a AssetRef, &'a ProcessFlow)> + 'a
fn flows_for_commodity( self, commodity_id: &'a CommodityID, ) -> impl Iterator<Item = (&'a AssetRef, &'a ProcessFlow)> + 'a
Iterate over process flows affecting the given commodity
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.