Repository navigation
Object safe collections and iterables are defined in obj_safe module
Object safe variants IterableObj, CollectionObj and CollectionMutObj are introduced in obj_safe module.
- Conditions to implicitly implement the object safe traits are identical to the original. Therefore, if a type implements, say
Collection, it also implementsCollectionObj; and vice versa. - Due to this equivalence, all iterable-to-iterable transformation methods work in the same manner as they work for original traits.
- Instead of
iteranditer_mut, object safe variants haveboxed_iterandboxed_iter_mutmethods which return iterators in a box. - In order to use them "std" feature must be activated. Standard library is optional; however, added in the default feature.
- However, object safe variants are not imported from the root module. In other words, we don't have access to them if we use
orx_iterable::*. This is intentional to keep the api cleaner unless we explicitly require trait objects. In order to use them, we can instead import byorx::iterable::{*, obj_safe::*}.