Skip to main content

Unions

This page is still under construction!

This feature is still not implemented!

Unions are usefull data structures that stores each one of it fields in the same memory space. It can be used to diferent purposes, such as storing diferent types in the same space or reading the same bits as another type.


Unions

This feature is still not implemented!

You can declarate an union at the following way:

@union struct ContactMethod {
let PhoneNumber phone
let InstagramUser instagram
let TikTokUser tiktok
}

Tagged Unions

This feature is still not implemented!


Free Unions

This feature is still not implemented!