pub fn new<B>(body: B) -> Self
    where
        B: http_body::Body<Data = bytes::Bytes> + Send + 'static,
        B::Error: Into<crate::BoxError>,
    {
        if body.is_end_stream() {
            return Self::empty();
        }

        let mut body = Some(body);

        if let Some(body) = <dyn std::any::Any>::downcast_mut::<Option<Body>>(&mut body) {
            return body.take().unwrap();
        }

        if let Some(body) = <dyn std::any::Any>::downcast_mut::<Option<BoxBody>>(&mut body) {
            return Self::from_kind(Kind::Wrap(body.take().unwrap()));
        }

        let body = body
            .unwrap()
            .map_err(crate::Status::map_error)
            .boxed_unsync();

        Self::from_kind(Kind::Wrap(body))
    }
Create a new `Body` from an existing `Body`.
tonic/src/body.rs