pub enum AssetState {
Commissioned {
id: AssetID,
agent_id: AgentID,
mothball_events: VecDeque<MothballEvent>,
},
Ready {
agent_id: AgentID,
commission_reason: &'static str,
},
Candidate,
}Expand description
The state of an asset
New assets are created as either Ready or Candidate assets. Ready assets from 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.
Ready assets can be converted to Commissioned assets by calling the commission method (or
via pool operations that commission ready assets).
Variants§
Commissioned
The asset has been commissioned
Fields
mothball_events: VecDeque<MothballEvent>Years in which all of some of the asset was mothballed.
Invariants: This must be sorted by year with older years first and the total number of units must not exceed the total for this asset.
Ready
The asset is ready for investment, but not yet confirmed
Fields
Candidate
The asset is a candidate for investment but has not yet been selected by an agent
Trait Implementations§
Source§impl Clone for AssetState
impl Clone for AssetState
Source§fn clone(&self) -> AssetState
fn clone(&self) -> AssetState
1.0.0 (const: unstable) · 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 Display for AssetState
impl Display for AssetState
Source§impl PartialEq for AssetState
impl PartialEq for AssetState
Source§fn eq(&self, other: &AssetState) -> bool
fn eq(&self, other: &AssetState) -> bool
self and other values to be equal, and is used by ==.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 UnsafeUnpin 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,
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