luaur-common 0.1.3

Foundational data structures and flags for the luaur Luau-in-Rust toolchain.
Documentation
1
2
3
4
5
6
7
8
9
10
11
pub fn variant_emplace() {
    // C++ `Variant::emplace<T, Args...>` is a low-level memory-management
    // operation that replaces the active alternative in a `std::variant`-like
    // storage.
    //
    // In this Rust port, `VariantN` enums are safe, type-safe tagged unions.
    // Reassignment is handled by standard assignment (e.g., `*v = VariantN::V<pos>(T::from(args))`),
    // which automatically drops the old value and initializes the new one.
    // A direct translation of the C++ placement-new/type-id-table logic is
    // unnecessary and unsafe in Rust.
}