pub struct AssetRef(Rc<Asset>);
Expand description
Tuple Fields§
§0: Rc<Asset>
Methods from Deref<Target = Asset>§
Sourcepub fn decommission_year(&self) -> u32
pub fn decommission_year(&self) -> u32
The last year in which this asset should be decommissioned
Sourcepub fn get_activity_limits(
&self,
time_slice: &TimeSliceID,
) -> RangeInclusive<Activity>
pub fn get_activity_limits( &self, time_slice: &TimeSliceID, ) -> RangeInclusive<Activity>
Get the activity limits for this asset in a particular time slice
Sourcepub fn maximum_activity(&self) -> Activity
pub fn maximum_activity(&self) -> Activity
Maximum activity for this asset
Sourcepub fn get_flow(&self, commodity_id: &CommodityID) -> Option<&ProcessFlow>
pub fn get_flow(&self, commodity_id: &CommodityID) -> Option<&ProcessFlow>
Get a specific process flow
Sourcefn get_flows_map(&self) -> &IndexMap<CommodityID, ProcessFlow>
fn get_flows_map(&self) -> &IndexMap<CommodityID, ProcessFlow>
Get the process flows map for this asset
Sourcepub fn iter_flows(&self) -> impl Iterator<Item = &ProcessFlow>
pub fn iter_flows(&self) -> impl Iterator<Item = &ProcessFlow>
Iterate over the asset’s flows
Trait Implementations§
Source§impl Ord for AssetRef
impl Ord for AssetRef
Source§impl PartialOrd for AssetRef
impl PartialOrd for AssetRef
impl Eq for AssetRef
Auto Trait Implementations§
impl Freeze for AssetRef
impl RefUnwindSafe for AssetRef
impl !Send for AssetRef
impl !Sync for AssetRef
impl Unpin for AssetRef
impl UnwindSafe for AssetRef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more