Open gatesn opened 3 days ago
Currently we use SomeArray::try_from(array_data) all over the place, but this incurs a large cost of creating backtraces.
SomeArray::try_from(array_data)
We do have array_data.is_encoding(SomeEncoding.id()) but it's a bit clunky.
array_data.is_encoding(SomeEncoding.id())
Proposal is for SomeArray::is_some(array_data) -> Option<SomeArray>
SomeArray::is_some(array_data) -> Option<SomeArray>
as_some? Is_some returning non bool is very weird imho. Is_encoding is only useful if you don’t want to convert the array data to an encoding, ie do some upfront validation
SomeArray::maybe_from(array_data)
Currently we use
SomeArray::try_from(array_data)
all over the place, but this incurs a large cost of creating backtraces.We do have
array_data.is_encoding(SomeEncoding.id())
but it's a bit clunky.Proposal is for
SomeArray::is_some(array_data) -> Option<SomeArray>