enum AssetCmp<'a> {
WithID(AssetID),
WithoutID((&'a ProcessID, &'a RegionID, u32, Option<&'a AgentID>, Option<AssetGroupID>)),
}Expand description
A data structure representing the fields of an Asset that should be used for comparisons.
For assets that have an ID (i.e. have been commissioned at some point), we can compare based on the ID. Otherwise, we fall back on comparing other properties. The combination of these properties should be unique within the simulation (e.g. for assets being input into dispatch).
Variants§
WithID(AssetID)
WithoutID((&'a ProcessID, &'a RegionID, u32, Option<&'a AgentID>, Option<AssetGroupID>))
Trait Implementations§
Source§impl<'a> Ord for AssetCmp<'a>
impl<'a> Ord for AssetCmp<'a>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a> PartialOrd for AssetCmp<'a>
impl<'a> PartialOrd for AssetCmp<'a>
impl<'a> Eq for AssetCmp<'a>
impl<'a> StructuralPartialEq for AssetCmp<'a>
Auto Trait Implementations§
impl<'a> Freeze for AssetCmp<'a>
impl<'a> RefUnwindSafe for AssetCmp<'a>
impl<'a> !Send for AssetCmp<'a>
impl<'a> !Sync for AssetCmp<'a>
impl<'a> Unpin for AssetCmp<'a>
impl<'a> UnsafeUnpin for AssetCmp<'a>
impl<'a> UnwindSafe for AssetCmp<'a>
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
§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.§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
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