pub enum IndexOrName {
Index(u32),
Name(&'static str),
}Expand description
Index-or-name parameter used by APIs such as game.get_player /
game.get_surface (uint32 | string in the Factorio schema).
Variants§
Trait Implementations§
Source§impl Clone for IndexOrName
impl Clone for IndexOrName
Source§fn clone(&self) -> IndexOrName
fn clone(&self) -> IndexOrName
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for IndexOrName
Source§impl Debug for IndexOrName
impl Debug for IndexOrName
Source§impl Default for IndexOrName
impl Default for IndexOrName
impl Eq for IndexOrName
Source§impl From<&'static str> for IndexOrName
impl From<&'static str> for IndexOrName
Source§impl From<IndexOrName> for LuaAny
impl From<IndexOrName> for LuaAny
Source§fn from(_: IndexOrName) -> Self
fn from(_: IndexOrName) -> Self
Converts to this type from the input type.
Source§impl From<u32> for IndexOrName
impl From<u32> for IndexOrName
Source§impl PartialEq for IndexOrName
impl PartialEq for IndexOrName
impl StructuralPartialEq for IndexOrName
Auto Trait Implementations§
impl Freeze for IndexOrName
impl RefUnwindSafe for IndexOrName
impl Send for IndexOrName
impl Sync for IndexOrName
impl Unpin for IndexOrName
impl UnsafeUnpin for IndexOrName
impl UnwindSafe for IndexOrName
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