Right now, when creating types with structure constraints (IndPtrBase, CsMatBase, CsVecBase) from owned data, the owned data is lost if the check fails, which can be incovenient for the caller.
A possible solution is to have SprsError be more than an enum, and parameterized on a type, so that it can store the input type in these cases.
I don't know how it will turn out for composability or performance though. Maybe it will be required to box the value, and maybe also to erase its type with Any to preserve composability.
Right now, when creating types with structure constraints (
IndPtrBase
,CsMatBase
,CsVecBase
) from owned data, the owned data is lost if the check fails, which can be incovenient for the caller.A possible solution is to have
SprsError
be more than an enum, and parameterized on a type, so that it can store the input type in these cases.I don't know how it will turn out for composability or performance though. Maybe it will be required to box the value, and maybe also to erase its type with
Any
to preserve composability.This will need a bit of experimentation.