diff --git a/http-body/src/lib.rs b/http-body/src/lib.rs index 0470906..1d1e538 100644 --- a/http-body/src/lib.rs +++ b/http-body/src/lib.rs @@ -85,6 +85,16 @@ pub trait Body { fn size_hint(&self) -> SizeHint { SizeHint::default() } + + /// Attempt to clone this body if the concrete type supports it. + /// + /// The default implementation returns `None` to indicate cloning is not supported. + fn try_clone(&self) -> Option + where + Self: Sized, + { + None + } } impl Body for &mut T {