pub trait Strategy: Sized {
    fn havoc<R: Random>(&mut self, rand: &mut R, buffer: &mut EncoderBuffer<'_>);

    fn havoc_slice<R: Random>(
        &mut self,
        rand: &mut R,
        buffer: &mut [u8]
    ) -> usize { ... } fn alternate<B: Strategy>(
        self,
        b: B,
        period: Range<usize>
    ) -> Alternate<Self, B> { ... } fn repeat(self, count: Range<usize>) -> Repeat<Self> { ... } fn randomly(self) -> Randomly<Self> { ... } fn toggle(self, period: Range<usize>) -> Toggle<Self> { ... } fn and_then<B: Strategy>(self, b: B) -> AndThen<Self, B> { ... } fn while_has_capacity(self) -> WhileHasCapacity<Self> { ... } }

Required Methods

Applies the havoc strategy to the supplied buffer

Provided Methods

Applies the havoc strategy to the supplied buffer slice and returns the new buffer length

Alternate between two strategies with the supplied period

Apply the strategy count times

Randomly apply the strategy

Toggle the strategy on and off for the supplied period

Applies two strategies in order

Repeatedly applies the strategy as long as the buffer has capacity

Implementors