#[derive(SubslicesMut)]
{
// Attributes available to this derive:
#[value_traits_subslices_mut]
}
Expand description
A derive macro fully implementing mutable subslices on top of a
SliceByValueMut
for which the derive macro Subslices has been already applied.
The macro defines a structure <YOUR TYPE>SubsliceImplMut that keeps track
of a mutable reference to a slice, and of the start and end of the subslice.
<YOUR TYPE>SubsliceImplMut then implements
SliceByValueMut,
SliceByValueSubslice,
and
SliceByValueSubsliceMut.
Note that
SliceByValueSubslice
methods will return the <YOUR TYPE>SubsliceImpl structure generated by the
Subslices macro.
§Chunks
Presently, try_chunks_mut
is not supported.
§Additional Bounds
Since this macro has no knowledge of the bounds of the generic parameters in
the implementations of
SliceByValue
and
SliceByValueMut,
additional bounds with respect to the type declaration must be specified
using the #[value_trait_subslice_mut(bound = "<BOUND>")] attribute.
Multiple bounds can be specified with multiple attributes.