Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

armanriazi•rust•union

A union is similar to a struct, but only one declared field is used in a particular instance at one time. Unions are primarily used to interface with unions in C code. 
Accessing union fields is unsafe because Rust can’t guarantee the type of the data currently being stored in the union instance. 
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
8+5 =