pub enum Stage {
Settings,
SettingsUpdates,
SettingsFinalFixes,
Data,
DataUpdates,
DataFinalFixes,
Control,
Shared,
}Variants§
Implementations§
Source§impl Stage
impl Stage
Sourcepub const SIDE_EFFECT_STAGES: [Self; 6]
pub const SIDE_EFFECT_STAGES: [Self; 6]
Stages that emit a Factorio root entry file with side-effect entry functions
(settings*.lua / data*.lua). Control uses event registration instead.
Sourcepub fn from_module_name(module_name: &str) -> Option<Self>
pub fn from_module_name(module_name: &str) -> Option<Self>
Infer a stage from a dotted module name (e.g. "control.on_built_entity").
Longer phase names are matched before shorter ones so
settings_updates does not fall through to settings.
Sourcepub const fn default_module_name(self) -> &'static str
pub const fn default_module_name(self) -> &'static str
The canonical root module name for this stage.
Sourcepub const fn entry_file_name(self) -> Option<&'static str>
pub const fn entry_file_name(self) -> Option<&'static str>
The Factorio entry-point file name for this stage, if any.
Shared modules have no entry file - they are required by other stages.
Sourcepub const fn has_side_effect_entry(self) -> bool
pub const fn has_side_effect_entry(self) -> bool
Whether public functions/structs in this stage are load-time entry points.
Trait Implementations§
impl Copy for Stage
impl Eq for Stage
impl StructuralPartialEq for Stage
Auto Trait Implementations§
impl Freeze for Stage
impl RefUnwindSafe for Stage
impl Send for Stage
impl Sync for Stage
impl Unpin for Stage
impl UnsafeUnpin for Stage
impl UnwindSafe for Stage
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