For a struct defined as below, I am looking for a method that would print all the members of the struct, including the bitfields.
public struct A {
public var privateVar0 : UInt32
public var bit_1 : UInt32 {
get {
return privateVar0 >> 0 & 0b00000000000000000000000000000001
}
}
public var bit_2 : UInt32 {
get {
return privateVar0 >> 1 & 0b00000000000000000000000000000001
}
}
public var bit_3 : UInt32 {
get {
return privateVar0 >> 2 & 0b00000000000000000000000000000001
}
}
}
Expected Output:
privateVar0 : <Value>
bit_1 : <Value>
bit_2 : <Value>
bit_3 : <Value>
I have tried to use the dump() in-built API that uses Mirror, but it prints only "privateVar0" and not the bitfields.