Derive Macro SubslicesMut

Source
#[derive(SubslicesMut)]
{
    // Attributes available to this derive:
    #[value_traits_subslices_mut]
}
Expand description

A derive macro fully implementing mutable subslices on top of a SliceByValueSet/SliceByValueRepl 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 SliceByValueGet, SliceByValueSet, SliceByValueRepl, SliceByValueSubslice, and SliceByValueSubsliceMut.

Note that SliceByValueSubslice methods will return the <YOUR TYPE>SubsliceImpl structure generated by the Subslices macro.

§Additional Bounds

Since this macro has no knowledge of the bounds of the generic parameters in the implementations of SliceByValue, SliceByValueSet, and SliceByValueRepl, 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.