pub trait HaystackSlice<'a>:
Sized
+ Debug
+ Clone {
type Item: HaystackItem;
}Expand description
A trait representing a slice of the underlying haystack for various
Haystack types.
The implementor of this trait is usually but not always, the only implementor of
IntoHaystack for a haystack type.
It should be noted that this trait is often implemented of a reference to the type in question,
e.g. &str or &[u8] rather than str or [u8] themselves, so that the implementing type can
be cloned as required.
Required Associated Types§
Sourcetype Item: HaystackItem
type Item: HaystackItem
The HaystackItem contained within this slice.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.