pub struct LuaVersion { /* private fields */ }Expand description
Represents the Lua version(s) to parse as. Lua 5.1 is always included. In order to get more Lua versions, you must include their respective features.
Implementations§
source§impl LuaVersion
impl LuaVersion
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new LuaVersion with the default features: Luau, Lua 5.2, Lua 5.3, and Lua 5.4.
sourcepub fn luau() -> Self
Available on crate feature luau only.
pub fn luau() -> Self
luau only.Creates a new LuaVersion with only Luau.
sourcepub fn with_luau(self) -> Self
Available on crate feature luau only.
pub fn with_luau(self) -> Self
luau only.Adds Luau as a version to parse for.
sourcepub fn lua52() -> Self
Available on crate feature lua52 only.
pub fn lua52() -> Self
lua52 only.Creates a new LuaVersion with only Lua 5.2.
sourcepub fn with_lua52(self) -> Self
Available on crate feature lua52 only.
pub fn with_lua52(self) -> Self
lua52 only.Adds Lua 5.2 as a version to parse for.
sourcepub fn lua53() -> Self
Available on crate feature lua53 only.
pub fn lua53() -> Self
lua53 only.Creates a new LuaVersion with only Lua 5.3.
sourcepub fn with_lua53(self) -> Self
Available on crate feature lua53 only.
pub fn with_lua53(self) -> Self
lua53 only.Adds Lua 5.3 as a version to parse for.
sourcepub fn lua54() -> Self
Available on crate feature lua54 only.
pub fn lua54() -> Self
lua54 only.Creates a new LuaVersion with only Lua 5.4.
sourcepub fn with_lua54(self) -> Self
Available on crate feature lua54 only.
pub fn with_lua54(self) -> Self
lua54 only.Adds Lua 5.4 as a version to parse for.
sourcepub fn luajit() -> Self
Available on crate feature luajit only.
pub fn luajit() -> Self
luajit only.Creates a new LuaVersion with only LuaJIT.
sourcepub fn with_luajit(self) -> Self
Available on crate feature luajit only.
pub fn with_luajit(self) -> Self
luajit only.Adds LuaJIT as a version to parse for.
sourcepub fn has_luajit(self) -> bool
pub fn has_luajit(self) -> bool
Returns true if LuaJIT is enabled.
Trait Implementations§
source§impl BitOr for LuaVersion
impl BitOr for LuaVersion
source§impl BitOrAssign for LuaVersion
impl BitOrAssign for LuaVersion
source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moresource§impl Clone for LuaVersion
impl Clone for LuaVersion
source§fn clone(&self) -> LuaVersion
fn clone(&self) -> LuaVersion
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for LuaVersion
impl Debug for LuaVersion
source§impl Default for LuaVersion
impl Default for LuaVersion
source§impl Hash for LuaVersion
impl Hash for LuaVersion
source§impl PartialEq for LuaVersion
impl PartialEq for LuaVersion
impl Copy for LuaVersion
impl Eq for LuaVersion
impl StructuralPartialEq for LuaVersion
Auto Trait Implementations§
impl Freeze for LuaVersion
impl RefUnwindSafe for LuaVersion
impl Send for LuaVersion
impl Sync for LuaVersion
impl Unpin for LuaVersion
impl UnwindSafe for LuaVersion
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)