feat(http/body-eos): `EosRef<'a, E>: Clone + Copy`
this commit introduces clone and copy implementations for the
EosRef<'a, E> type used to inspect and classify the outcome of a
request or response body.
as the documentation comment notes in the commit below, this enum only contains immutable references to other values: a header map or an error. other variants are empty tags.
pub enum EosRef<'a, E = Error> {
None,
Trailers(&'a HeaderMap),
Error(&'a E),
Cancelled,
}
this commit makes this type implicitly clonable.
Signed-off-by: katelyn martin [email protected]
see https://github.com/linkerd/linkerd2-proxy/pull/4246, where this "end of stream" middleware was previously introduced.
see https://github.com/linkerd/linkerd2-proxy/pull/4306, which builds upon this change to make further use of our EosRef<'a, E> model in our stream labeling facilities.