Trait pattern_3::haystack::SharedHaystack[][src]

pub trait SharedHaystack: Haystack + Clone where
    Self::Target: Hay
{ }

A haystack which can be shared and cheaply cloned (e.g. &H, Rc<H>).

If a haystack implements this marker trait, during internal operations the original haystack will be retained in full and cloned, rather than being sliced and splitted. Being a shared haystack allows searcher to see the entire haystack, including the consumed portion.

Implementations on Foreign Types

impl<'a, A: Hay + ?Sized + 'a> SharedHaystack for &'a A
[src]

Implementors