package core.misc
any_deep_copy :: (args: [] any, allocator: Allocator) -> [] any
Creates a deep copy of an array of any
s.
Copies the slice to a new slice, and all of the any
data members.
any_member :: (v: any, member_type: type_expr, member_offset: u32) -> any
any_member :: (v: any, member: &Type_Info_Struct.Member) -> any
any_nested_selector :: (v: any, member_name: [] u8) -> any
Like any_selector
, but works with selecting "foo.bar.joe".
any_to_map :: (v: any) -> ? Map([] u8, any)
Convert a structure or pointer to a structure to a Map with keys representing the fields of the structure, and values representing the value of each field.
T :: struct {
x := 123;
y := "test";
}
m := any_to_map(T.{});
m
would have two keys, "x" and "y".
any_unwrap :: (v: any) -> any
Unwraps an optional any, if the any is an optional. ? T -> T