Skip to main content

AssetIterator

Trait AssetIterator 

Source
pub trait AssetIterator<'a>: Iterator<Item = &'a AssetRef> + Sized
where 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§

Source

fn filter_agent( self, agent_id: &'a AgentID, ) -> impl Iterator<Item = &'a AssetRef> + 'a

Filter assets by the agent that owns them

Source

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

Source

fn filter_region( self, region_id: &'a RegionID, ) -> impl Iterator<Item = &'a AssetRef> + 'a

Filter the assets by region

Source

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".

Implementors§

Source§

impl<'a, I> AssetIterator<'a> for I
where I: Iterator<Item = &'a AssetRef> + Sized + 'a,