pub trait LuaVersion: 'static + Sealed {
Show 14 associated constants and 0 method
const NAME: &'static str;
const HAS_FLOOR_DIV: bool;
const HAS_COMPOUND_ASSIGN: bool;
const HAS_CONTINUE: bool;
const HAS_IF_EXPR: bool;
const HAS_STRING_INTERP: bool;
const HAS_TYPE_ANNOTATIONS: bool;
const HAS_ATTRIBUTES: bool;
const HAS_GENERICS: bool;
const HAS_EXPORT: bool;
const HAS_GOTO: bool;
const HAS_BITWISE_OPS: bool;
const HAS_VARIABLE_ATTRIBUTES: bool;
const HAS_CONST: bool;
}Expand description
Required Associated Constants§
Sourceconst HAS_FLOOR_DIV: bool
const HAS_FLOOR_DIV: bool
// integer division operator.
Sourceconst HAS_COMPOUND_ASSIGN: bool
const HAS_COMPOUND_ASSIGN: bool
Compound assignment operators (+=, -=, etc.).
Sourceconst HAS_CONTINUE: bool
const HAS_CONTINUE: bool
The continue keyword inside loops.
Sourceconst HAS_IF_EXPR: bool
const HAS_IF_EXPR: bool
Inline if cond then a else b expressions.
Sourceconst HAS_STRING_INTERP: bool
const HAS_STRING_INTERP: bool
Backtick interpolated strings (`hello {name}`).
Sourceconst HAS_TYPE_ANNOTATIONS: bool
const HAS_TYPE_ANNOTATIONS: bool
Type annotations (: Type, -> ReturnType).
Sourceconst HAS_ATTRIBUTES: bool
const HAS_ATTRIBUTES: bool
@native and similar function attributes.
Sourceconst HAS_GENERICS: bool
const HAS_GENERICS: bool
Generic type parameters (<T>).
Sourceconst HAS_EXPORT: bool
const HAS_EXPORT: bool
export type declarations.
Sourceconst HAS_BITWISE_OPS: bool
const HAS_BITWISE_OPS: bool
Bitwise operators (&, |, ~, <<, >>).
Sourceconst HAS_VARIABLE_ATTRIBUTES: bool
const HAS_VARIABLE_ATTRIBUTES: bool
<const> and <close> variable attributes (Lua 5.4).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.