append and try_append
Added append and try_append with tests to implement https://github.com/bluss/arrayvec/issues/103
Any update on this? @bluss
Can we do this - don't provide append because it doesn't have a clear error handling story. Users can use extend if they want to do this exact operation already.
try_append is good. I think it should handle both appending arrays and arrayvecs, if possible
I'd think try_extend gives a better name.
Good point, but try-extend can be reserved for (Into-)iterators, and we can't handle them all efficiently in one method without an extra trait. Depending on what trait is needed to handle arrays and arrayvecs for try-append, we can decide then.
Possibly we should separate them based on error handling - appending with an array should typically be "atomic" - either the whole array fits, success, or no elements are inserted, and error. With an iterator, we'd insert as many as we can, and then error if there are elements left when we are full.