pub enum AssetState {
Commissioned {
id: AssetID,
agent_id: AgentID,
},
Decommissioned {
id: AssetID,
agent_id: AgentID,
decommission_year: u32,
},
Future {
agent_id: AgentID,
},
Selected {
agent_id: AgentID,
},
Candidate,
}
Expand description
The state of an asset
New assets are created as either Future
or Candidate
assets. Future
assets (which are
specified in the input data) have a fixed capacity and capital costs already accounted for,
whereas Candidate
assets capital costs are not yet accounted for, and their capacity is
determined by the investment algorithm.
Future
and Candidate
assets can be converted to Commissioned
assets by calling
commission_future
or commission_candidate
respectively.
Commissioned
assets can be decommissioned by calling decommission
.
Variants§
Commissioned
The asset has been commissioned
Decommissioned
The asset has been decommissioned
Fields
Future
The asset is planned for commissioning in the future
Selected
The asset has been selected for investment, but not yet confirmed
Candidate
The asset is a candidate for investment but has not yet been selected by an agent
Implementations§
Trait Implementations§
Source§impl Clone for AssetState
impl Clone for AssetState
Source§fn clone(&self) -> AssetState
fn clone(&self) -> AssetState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AssetState
impl Debug for AssetState
Source§impl<'de> Deserialize<'de> for AssetState
impl<'de> Deserialize<'de> for AssetState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for AssetState
impl Hash for AssetState
Source§impl Ord for AssetState
impl Ord for AssetState
Source§fn cmp(&self, other: &AssetState) -> Ordering
fn cmp(&self, other: &AssetState) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for AssetState
impl PartialEq for AssetState
Source§impl PartialOrd for AssetState
impl PartialOrd for AssetState
Source§impl Serialize for AssetState
impl Serialize for AssetState
impl Eq for AssetState
impl StructuralPartialEq for AssetState
Auto Trait Implementations§
impl Freeze for AssetState
impl RefUnwindSafe for AssetState
impl !Send for AssetState
impl !Sync for AssetState
impl Unpin for AssetState
impl UnwindSafe for AssetState
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
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
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>
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>
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