Most notably, it doesn't have the Deref that Out<[T]> does, so it doesn't get len and friends. Unfortunately I tried adding Deref into #29 and this caused a large series of type ambiguities, enough that it makes the library much less ergonomic.
The simplest option here is to just duplicated the most desired methods available in Out<[T]> as inherent methods. I'm thinking:
Most notably, it doesn't have the
Deref
thatOut<[T]>
does, so it doesn't getlen
and friends. Unfortunately I tried addingDeref
into #29 and this caused a large series of type ambiguities, enough that it makes the library much less ergonomic.The simplest option here is to just duplicated the most desired methods available in
Out<[T]>
as inherent methods. I'm thinking:len(&self) -> usize
is_empty(&self) -> bool
get_out<I: IndexTrait>(self, idx: I) -> Option<Out<'out, I::Output>>
get_out_unchecked<I: IndexTrait>(self, idx: I) -> Out<'out, I::Output>
Ideally though the
get_out
andget_out_unchecked
are both provided through a sharedfn
because of the improved documentation.