Skip to main content

RegistrationTarget

Enum RegistrationTarget 

Source
pub enum RegistrationTarget {
Show 25 variants Entity(LuaEntity), Equipment(LuaEquipment), EquipmentGrid(LuaEquipmentGrid), Item(LuaItem), LogisticCell(LuaLogisticCell), LogisticNetwork(LuaLogisticNetwork), LogisticSection(LuaLogisticSection), PermissionGroup(LuaPermissionGroup), Planet(LuaPlanet), Player(LuaPlayer), RailPath(LuaRailPath), RenderObject(LuaRenderObject), SpacePlatform(LuaSpacePlatform), Surface(LuaSurface), Train(LuaTrain), Commandable(LuaCommandable), CustomChartTag(LuaCustomChartTag), GuiElement(LuaGuiElement), CargoHatch(LuaCargoHatch), Schedule(LuaSchedule), Territory(LuaTerritory), SegmentedUnit(LuaSegmentedUnit), ElectricNetwork(LuaElectricNetwork), ElectricSubNetwork(LuaElectricSubNetwork), Force(LuaForce),
}
Expand description

Represents an object that can be registered for the on_object_destroyed event. Each target has an associated defines.target_type and some have a unique identifier.

Variants§

§

Entity(LuaEntity)

§

Equipment(LuaEquipment)

§

EquipmentGrid(LuaEquipmentGrid)

§

Item(LuaItem)

§

LogisticCell(LuaLogisticCell)

§

LogisticNetwork(LuaLogisticNetwork)

§

LogisticSection(LuaLogisticSection)

§

PermissionGroup(LuaPermissionGroup)

§

Planet(LuaPlanet)

§

Player(LuaPlayer)

§

RailPath(LuaRailPath)

§

RenderObject(LuaRenderObject)

§

SpacePlatform(LuaSpacePlatform)

§

Surface(LuaSurface)

§

Train(LuaTrain)

§

Commandable(LuaCommandable)

§

CustomChartTag(LuaCustomChartTag)

§

GuiElement(LuaGuiElement)

§

CargoHatch(LuaCargoHatch)

§

Schedule(LuaSchedule)

§

Territory(LuaTerritory)

§

SegmentedUnit(LuaSegmentedUnit)

§

ElectricNetwork(LuaElectricNetwork)

§

ElectricSubNetwork(LuaElectricSubNetwork)

§

Force(LuaForce)

Trait Implementations§

Source§

impl Clone for RegistrationTarget

Source§

fn clone(&self) -> RegistrationTarget

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for RegistrationTarget

Source§

impl Debug for RegistrationTarget

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RegistrationTarget

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl From<LuaCargoHatch> for RegistrationTarget

Source§

fn from(value: LuaCargoHatch) -> Self

Converts to this type from the input type.
Source§

impl From<LuaCommandable> for RegistrationTarget

Source§

fn from(value: LuaCommandable) -> Self

Converts to this type from the input type.
Source§

impl From<LuaCustomChartTag> for RegistrationTarget

Source§

fn from(value: LuaCustomChartTag) -> Self

Converts to this type from the input type.
Source§

impl From<LuaElectricNetwork> for RegistrationTarget

Source§

fn from(value: LuaElectricNetwork) -> Self

Converts to this type from the input type.
Source§

impl From<LuaElectricSubNetwork> for RegistrationTarget

Source§

fn from(value: LuaElectricSubNetwork) -> Self

Converts to this type from the input type.
Source§

impl From<LuaEntity> for RegistrationTarget

Source§

fn from(value: LuaEntity) -> Self

Converts to this type from the input type.
Source§

impl From<LuaEquipment> for RegistrationTarget

Source§

fn from(value: LuaEquipment) -> Self

Converts to this type from the input type.
Source§

impl From<LuaEquipmentGrid> for RegistrationTarget

Source§

fn from(value: LuaEquipmentGrid) -> Self

Converts to this type from the input type.
Source§

impl From<LuaForce> for RegistrationTarget

Source§

fn from(value: LuaForce) -> Self

Converts to this type from the input type.
Source§

impl From<LuaGuiElement> for RegistrationTarget

Source§

fn from(value: LuaGuiElement) -> Self

Converts to this type from the input type.
Source§

impl From<LuaItem> for RegistrationTarget

Source§

fn from(value: LuaItem) -> Self

Converts to this type from the input type.
Source§

impl From<LuaLogisticCell> for RegistrationTarget

Source§

fn from(value: LuaLogisticCell) -> Self

Converts to this type from the input type.
Source§

impl From<LuaLogisticNetwork> for RegistrationTarget

Source§

fn from(value: LuaLogisticNetwork) -> Self

Converts to this type from the input type.
Source§

impl From<LuaLogisticSection> for RegistrationTarget

Source§

fn from(value: LuaLogisticSection) -> Self

Converts to this type from the input type.
Source§

impl From<LuaPermissionGroup> for RegistrationTarget

Source§

fn from(value: LuaPermissionGroup) -> Self

Converts to this type from the input type.
Source§

impl From<LuaPlanet> for RegistrationTarget

Source§

fn from(value: LuaPlanet) -> Self

Converts to this type from the input type.
Source§

impl From<LuaPlayer> for RegistrationTarget

Source§

fn from(value: LuaPlayer) -> Self

Converts to this type from the input type.
Source§

impl From<LuaRailPath> for RegistrationTarget

Source§

fn from(value: LuaRailPath) -> Self

Converts to this type from the input type.
Source§

impl From<LuaRenderObject> for RegistrationTarget

Source§

fn from(value: LuaRenderObject) -> Self

Converts to this type from the input type.
Source§

impl From<LuaSchedule> for RegistrationTarget

Source§

fn from(value: LuaSchedule) -> Self

Converts to this type from the input type.
Source§

impl From<LuaSegmentedUnit> for RegistrationTarget

Source§

fn from(value: LuaSegmentedUnit) -> Self

Converts to this type from the input type.
Source§

impl From<LuaSpacePlatform> for RegistrationTarget

Source§

fn from(value: LuaSpacePlatform) -> Self

Converts to this type from the input type.
Source§

impl From<LuaSurface> for RegistrationTarget

Source§

fn from(value: LuaSurface) -> Self

Converts to this type from the input type.
Source§

impl From<LuaTerritory> for RegistrationTarget

Source§

fn from(value: LuaTerritory) -> Self

Converts to this type from the input type.
Source§

impl From<LuaTrain> for RegistrationTarget

Source§

fn from(value: LuaTrain) -> Self

Converts to this type from the input type.
Source§

impl From<RegistrationTarget> for LuaAny

Source§

fn from(_: RegistrationTarget) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for RegistrationTarget

Source§

fn eq(&self, other: &RegistrationTarget) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for RegistrationTarget

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.