Canonical way to have owning/non-owning sibling types

In this case you can define the type as below.

struct MyData<'a> {
    name: Cow<'a, str>,
    numbers: Cow<'a, [i32]>,
}

and use `MyData<'static> as a owned type.

As a side note, reading file as &[i32] doesn't seems like a good idea, because that file can be transferred to the machine with different endianness. Most file/network formats enforces big endian to handle this portability problem. The only major format I know that doesn't follows this practice is UTF-16 which is mostly used within MS windows. They inserts BOM(Byte Order Mark) character at the start of every UTF-16 file to detect the file's endianness. But it makes parsing a bit harder, you can easily find a realm of BOM-haters on the internet.