A span corresponds to the starting and ending byte offsets of a
contiguous region of bytes. The starting offset is inclusive while the
ending offset is exclusive. That is, a span is a half-open interval.
A span is used to report the offsets of a match, but it is also used to
convey which region of a haystack should be searched via routines like
Input::span.
This is basically equivalent to a std::ops::Range<usize>, except this
type implements Copy which makes it more ergonomic to use in the context
of this crate. Indeed, Span exists only because Range<usize> does
not implement Copy. Like a range, this implements Index for [u8]
and str, and IndexMut for [u8]. For convenience, this also impls
From<Range>, which means things like Span::from(5..10) work.
There are no constraints on the values of a span. It is, for example, legal
to create a span where start > end.