Skip to content

1.0.0-beta.2

Pre-release
Pre-release
Compare
Choose a tag to compare
@okready okready released this 31 May 20:07
· 53 commits to 1.x since this release

Added

  • SliceSource trait for providing slice data to Marker functions from
    various source data types.
  • SliceMoveSource subtrait of SliceSource that allows for taking ownership
    of the contents of a slice.
  • SliceSourceCollection trait for abstracting collections of SliceSource
    objects.
  • SliceMoveSourceCollection subtrait of SliceSourceCollection that allows
    for taking ownership of the slices provided by all SliceSource objects in
    a collection.
  • Marker::concat_slices() function for concatenating slices by moving their
    contents into the new allocation.

Changed

  • Overhauled Marker functions that work with slices to take slice input
    using the new SliceSource, SliceMoveSource, SliceSourceCollection, and
    SliceMoveSourceCollection traits, allowing for more flexible input for
    slice data. Additionally, the inputs for these functions are now more
    consistent with one another.
  • Renamed IntoSliceAllocation to IntoSliceLikeAllocation and updated its
    methods accordingly for consistency with other traits that work with
    SliceLike types.
  • Unconditionally enable i128 and u128 implementations of ByteData if
    the rustc version detected at build time is 1.26 or later.

Removed

  • OwnedSlice trait (superseded by SliceSource and its related traits).
  • Automatic coercion of scalar values (including boxed scalars) and boxed
    arrays into slices when used as arguments for Marker::allocate_slice(),
    Marker::extend(), and the related MarkerFront and MarkerBack wrappers.
    Support for scalars previously resulted in ambiguity when trying to
    determine whether an array or slice reference should be interpreted as a
    slice of its contents or a single-element slice containing either the array
    or slice reference, requiring explicit type annotations in such cases. On
    the other hand, support for boxed arrays simply becomes difficult to
    implement when using the newly added Array trait, so they've simply been
    removed in response. Both can still be used as input via explicit conversion
    into a supported type.
  • Miscellaneous unnecessary generic parameters.

Fixed

  • Check for the correct feature ("unstable" versus "nightly") in the cfg
    attributes used to control whether ByteData implementations are generated
    for i128 and u128.