pub struct LuaRailPath;Expand description
A rail path.
Implementations§
Source§impl LuaRailPath
impl LuaRailPath
Sourcepub fn object_name(&self) -> &str
pub fn object_name(&self) -> &str
The class name of this object. Available even when valid is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
Sourcepub fn total_distance(&self) -> f64
pub fn total_distance(&self) -> f64
The total path distance.
Sourcepub fn travelled_distance(&self) -> f64
pub fn travelled_distance(&self) -> f64
The total distance traveled.
Sourcepub fn valid(&self) -> bool
pub fn valid(&self) -> bool
Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be false. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
Trait Implementations§
Source§impl Clone for LuaRailPath
impl Clone for LuaRailPath
Source§fn clone(&self) -> LuaRailPath
fn clone(&self) -> LuaRailPath
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 LuaRailPath
Source§impl Debug for LuaRailPath
impl Debug for LuaRailPath
Source§impl Default for LuaRailPath
impl Default for LuaRailPath
Source§fn default() -> LuaRailPath
fn default() -> LuaRailPath
Returns the “default value” for a type. Read more
impl Eq for LuaRailPath
Source§impl From<LuaRailPath> for LuaAny
impl From<LuaRailPath> for LuaAny
Source§fn from(_: LuaRailPath) -> Self
fn from(_: LuaRailPath) -> Self
Converts to this type from the input type.
impl LuaObject for LuaRailPath
Source§impl PartialEq for LuaRailPath
impl PartialEq for LuaRailPath
impl StructuralPartialEq for LuaRailPath
Auto Trait Implementations§
impl Freeze for LuaRailPath
impl RefUnwindSafe for LuaRailPath
impl Send for LuaRailPath
impl Sync for LuaRailPath
impl Unpin for LuaRailPath
impl UnsafeUnpin for LuaRailPath
impl UnwindSafe for LuaRailPath
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