Skip to main content

Crate factorio_api

Crate factorio_api 

Source
Expand description

Generated Factorio runtime API bindings.

These types exist for Rust type-checking and IDE support. Mod code is transpiled to Lua and never executes these stub implementations.

Re-exports§

pub use event_filters::EventFilterEntry;
pub use event_filters::FilterMethodSpec;
pub use event_filters::filter_method_spec;
pub use lua_libs::LuaMath;
pub use lua_libs::LuaStringLib;
pub use lua_libs::LuaTableLib;
pub use map::event_filter_type;
pub use map::event_type_to_name;
pub use unions::literal_enum_variant_str;

Modules§

classes
concepts
debug_types
defines
event_data
event_filters
events
globals
lua_libs
Standard Lua libraries available as Factorio globals (math, string, table).
map
prelude
settings
unions

Structs§

LocalisedString
Factorio LocalisedString: a plain string or a translation table { "category.key", arg1, ... }.
LuaAny
Opaque placeholder for complex Factorio Lua API values.
LuaFunction
LuaStorage
Serpent

Enums§

IndexOrName
Index-or-name parameter used by APIs such as game.get_player / game.get_surface (uint32 | string in the Factorio schema).

Traits§

IntoOptionalLuaFunction
LuaObject
Marker trait for autogenerated Factorio API types. Do not implement this trait manually.
SettingValue
Marker trait for types that can be used as Factorio mod setting values.

Functions§

lua_fn
Coerce a Rust fn item or closure to LuaFunction.
lua_fn0
lua_fn2