pub trait Technology:
Sealed
+ Debug
+ Sized
+ TechnologyEx {
type Unlocks;
const NAME: &'static str;
const REQUIRED_RESEARCH_POINTS: u32 = Self::REQUIRED_RESEARCH_POINTS_EX;
// Required method
fn research(
self,
research_points: Bundle<ResearchPoint<Self>, { Self::REQUIRED_RESEARCH_POINTS }>,
) -> Self::Unlocks;
}Expand description
A technology can be unlocked out by calling the research method with the required science packs.
This will consume the science packs and the technology itself, and return whatever the technology unlocks, mostly recipes and other technologies.
Required Associated Constants§
Provided Associated Constants§
Sourceconst REQUIRED_RESEARCH_POINTS: u32 = Self::REQUIRED_RESEARCH_POINTS_EX
const REQUIRED_RESEARCH_POINTS: u32 = Self::REQUIRED_RESEARCH_POINTS_EX
How many of this technology’s research points (ResearchPoint<T>) are needed to complete the research.
Required Associated Types§
Required Methods§
Sourcefn research(
self,
research_points: Bundle<ResearchPoint<Self>, { Self::REQUIRED_RESEARCH_POINTS }>,
) -> Self::Unlocks
fn research( self, research_points: Bundle<ResearchPoint<Self>, { Self::REQUIRED_RESEARCH_POINTS }>, ) -> Self::Unlocks
Carries out the research by consuming the required science packs and the research itself, returning whatever this research unlocks.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.