Releases: orxfun/orx-pinned-vec
Dual license
Dual license
Merge pull request #41 from orxfun/dual-license dual-license
Pinned vectors implement Collection and CollectionMut
Rather than requiring iter
and iter_mut
methods, pinned vectors now follow the pattern defined in orx-iterable crate; i.e.,:
P: PinnedVec<T>
implementsIntoIterator<Item = T>
&P
implementsIntoIterator<Item = &T>
&mut P
implementsIntoIterator<Item = &mut T>
With these implementations, every pinned vector implicitly implements Collection
and CollectionMut
providing iter
and iter_mut
methods.
Pinned elements guarantee documentation and tests are revised
Individual methods to test different pinned elements guarantees are exposed.
Pinned elements guarantees are redefined and the documentation is revised.
Iterator over range
iter_over_range
method is provided.
At one hand, vec.iter_over_range(a..b)
is equivalent to vec.iter().skip(a).take(b - a)
. However, the latter requires a
unnecessary next
calls. Since all pinned vectors provide random access to elements, the objective of iter_over_range
is to directly jump to a
and create an iterator from this point on, and hence, avoiding the unnecessary iterations at the beginning.
Also
- vec_range_limits helper method is also provided.
Support for Self Referential Collections
The following methods are required by pinned vectors:
- index_of_ptr
- push_get_ptr
- iter_ptr
- iter_ptr_rev
- contains_ptr
- get_ptr
Crate is converted to no_std
Merge pull request #33 from orxfun/no-std library is converted to no_std
Reserve initiated capacity
reserve_maximum_concurrent_capacity_fill_with
method is required.
Concurrent Clone and Fill methods are defined
- clone_with_len is required for thread safe cloning of data.
- fill_with, on the other hand, is required for data structures that needs to be gap-free all the time.
Index and IndexMut traits are required
Merge pull request #29 from orxfun/index-and-index-mut-are-required Index and IndexMut traits are required