Enum screeps::constants::minerals::ResourceType [−][src]
Resource type constant for all possible types of resources.
Note: This constant's TryFrom<Value>
, Serialize
and Deserialize
implementations only operate on made-up integer constants. If you're ever
using these impls manually, use the __resource_type_num_to_str
and __resource_type_str_to_num
JavaScript functions,
FromStr
or ResourceType::deserialize_from_str
.
See the module-level documentation for more details.
Variants
"energy"
"power"
"H"
"O"
"U"
"L"
"K"
"Z"
"X"
"G"
"OH"
"ZK"
"UL"
"UH"
"UO"
"KH"
"KO"
"LH"
"LO"
"ZH"
"ZO"
"GH"
"GO"
"UH2O"
"UHO2"
"KH2O"
"KHO2"
"LH2O"
"LHO2"
"ZH2O"
"ZHO2"
"GH2O"
"GHO2"
"XUH2O"
"XUHO2"
"XKH2O"
"XKHO2"
"XLH2O"
"XLHO2"
"XZH2O"
"XZHO2"
"XGH2O"
"XGHO2"
"ops"
"silicon"
"metal"
"biomass"
"mist"
"utrium_bar"
"lemergium_bar"
"zynthium_bar"
"keanium_bar"
"ghodium_melt"
"oxidant"
"reductant"
"purifier"
"battery"
"composite"
"crystal"
"liquid"
"wire"
"switch"
"transistor"
"microchip"
"circuit"
"device"
"cell"
"phlegm"
"tissue"
"muscle"
"organoid"
"organism"
"alloy"
"tube"
"fixtures"
"frame"
"hydraulics"
"machine"
"condensate"
"concentrate"
"extract"
"spirit"
"emanation"
"essence"
Implementations
impl ResourceType
[src]
pub fn reaction_components(self) -> Option<[ResourceType; 2]>
[src]
Translates the REACTIONS
constant.
pub fn reaction_time(self) -> Option<u32>
[src]
Translates the REACTION_TIME
constant.
pub fn commodity_recipe(self) -> Option<FactoryRecipe>
[src]
Translates the COMMODITIES
constant to recipes that can be used by a
factory to make each commodity
impl ResourceType
[src]
pub fn boost(self) -> Option<Boost>
[src]
Translates the BOOSTS
constant.
pub fn deserialize_from_str<'de, D: Deserializer<'de>>(
d: D
) -> Result<Self, D::Error>
[src]
d: D
) -> Result<Self, D::Error>
Helper function for deserializing from a string rather than a fake integer value.
Trait Implementations
impl Clone for ResourceType
[src]
fn clone(&self) -> ResourceType
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for ResourceType
[src]
impl Debug for ResourceType
[src]
impl<'de> Deserialize<'de> for ResourceType
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Display for ResourceType
[src]
impl Eq for ResourceType
[src]
impl FromStr for ResourceType
[src]
type Err = ParseError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl Hash for ResourceType
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<ResourceType> for ResourceType
[src]
fn eq(&self, other: &ResourceType) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for ResourceType
[src]
impl StructuralEq for ResourceType
[src]
impl StructuralPartialEq for ResourceType
[src]
impl TryFrom<Value> for ResourceType
[src]
Auto Trait Implementations
impl RefUnwindSafe for ResourceType
[src]
impl Send for ResourceType
[src]
impl Sync for ResourceType
[src]
impl Unpin for ResourceType
[src]
impl UnwindSafe for ResourceType
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> IntoExpectedType<U> for T where
U: FromExpectedType<T>,
[src]
U: FromExpectedType<T>,
pub fn into_expected_type(Self) -> Result<U, ConversionError>
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,