AnyVec
now can work withAnyValueSizeless
.any_value::traits
prelude.
AnyValue
- family downcast now use provided type for compile-time optimization, instead of potentially unknown underlying type (which disabled optimization technique).
AnyValue
+AnyValueUnknown
traits broken down into:AnyValueUnknown
->AnyValueTypeless
.- Introduced
AnyValueSizeless
-AnyValue
that does know size and type. - Added
any_value::move_out
,any_value::move_out_w_size
helpers.
- Changed AnyValueRaw non-owning wrappers names:
AnyValueRawUnknown
->AnyValueTypelessRaw
.- Introduced
AnyValueSizelessRaw
.
element::ElementReference
trait, implemented both forElementRef
,ElementMut
and &Element
.
- Documentation clarification.
- Minor changes, to eliminate warnings with new compiler version.
AnyValue
split intoAnyValueUnknown
+AnyValue
.AnyValueMut
split intoAnyValueMutUnknown
+AnyValueMut
.AnyVec::push_unchecked(AnyValueUnknown)
.AnyVec::insert_unchecked(usize, AnyValueUnknown)
.AnyValueRawUnknown
.mem::Empty
.
AnyVec::into_raw_parts
/AnyVec::from_raw_parts
/RawParts
.MemRawParts
.AnyVec::element_drop
.AnyVec::element_clone
.
HeapMem
implementsMemRawParts
.
AnyVec::splice
now check types.
AnyValue::bytes()->*const u8
andAnyValue::size()->usize
replaced withAnyValue::as_bytes()->&[u8]
. Same forAnyValueMut
.AnyValueWrapper
nowAnyValueMut
.AnyValueRaw
nowAnyValueMut
.AnyValue::as_bytes()
now return&[u8]
.
Debug
implemented forAnyVec
,AnyVecTyped
.AnyValueMut::swap()
added.AnyVec
/AnyVecTyped
::set_len()
added.AnyVec::as_bytes_mut
added.AnyVec::spare_bytes_mut
added.AnyVecTyped::spare_capacity_mut
added.mem::StackN
added.
- Stacked Borrow friendly now.
mem::Stack
capacity fixed.
impls
dependency dropped.- minimum rust version 1.61 requirement dropped.
- Empty
HeapMem
used wrong aligned dangling pointer. Fixed. AnyVec
Send/Sync -ability now MemBuilder dependent.- Fixed UB with
StackMem::as_ptr
.
MemBuilder
+Mem
= Allocator.Stack
Mem/Allocator.AnyVec::clone_empty_in
reserve
reserve_exact
shrink_to_fit
shrink_to
pop
is_empty
- Added
AnyVec::at
- ergonomic version ofget
. AnyVecRef
now cloneable.ElementRef
now cloneable.- non-consuming iterators now cloneable.
AnyVec::drain
.AnyVecTyped::drain
.AnyVec::slice
.AnyVecTyped::slice
.AnyVec
iterators.AnyVec::clone_empty
, to constructAnyVec
of the same type.IntoIterator
implemented.
crate::refs
being implementation details, hided.
AnyValueClonable
andLazyClone
added.AnyVec
getters added.AnyValueMut
added. All remove operations now returnAnyValueMut
+AnyValueClonable
.
any_value::AnyValue::downcast<T>
now returnOption<T>
.traits::EmptyTrait
renamed totraits::None
.AnyValue
interface changed.
- Performance of all remove operations slightly increased.
AnyVec
now can be Sync, Send, Clone.
any_value::AnyValueTemp
moved toops::AnyValueTemp
any_vec::Unknown
->any_vec::any_value::Unknown
AnyVec::insert
now check type again.AnyValueWrapper::downcast
UB fx.
- Major type erased API change. All
AnyVec
operations now safe.
- Introduced
any_value
family, which provide type erased safe operations.
AnyVec::remove
AnyVec::remove_into
AnyVecTyped::remove
AnyVec::insert_uninit
AnyVecTyped::insert
- Major API change. All typed operations placed into
AnyVecTyped<T>
.
swap_remove
further optimized.swap_take
on par withVec::swap_remove
now.
- Fixed UB in
swap_remove
that happens if element destructor panics.
- All remove operations become faster. Destructor function is not called now, if type does not need drop.
AnyVec
is nowOption
-friendly. (by @SabrinaJewson)- It is now possible for
AnyVec
to have zero capacity. AnyVec::new()
now starts with zero capacity.
- Fixed UB with construction with ZST. (by @SabrinaJewson)
- Fixed UB in
clear()
that happens if dropping panics. (by @SabrinaJewson) - as_mut_slice family now take
&mut self
instead of&self
. (by @SabrinaJewson)
AnyVec::with_capacity
added.- push benchmark added.
AnyVec::element_size
removed,AnyVec::element_layout
added instead.
push
family performance improved.
- Fixed Zero-Size-Type memory allocation.
- Initial working implementation with
push
,swap_remove
andas_slice
.